Skip to content

Instantly share code, notes, and snippets.

@mkristian
Created February 15, 2010 16:27
Show Gist options
  • Save mkristian/304768 to your computer and use it in GitHub Desktop.
Save mkristian/304768 to your computer and use it in GitHub Desktop.
require 'rubygems'
require 'dm-core'
require 'do_sqlite3'
DataMapper.setup(:default, "sqlite3:memory:")
class Name
include DataMapper::Resource
property :name, String, :key => true
belongs_to :hmm, :model => "Name"
end
Name.auto_migrate!
describe 'reload' do
it 'should validate only once for extended resource' do
n = Name.new(:name => 'frodo')
n.hmm = n
n.save
p DataObjects::Pooling.pools
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment