Created
February 15, 2010 16:27
-
-
Save mkristian/304768 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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