Support providing an initialization block when creating new models

This commit is contained in:
Peter Williams 2011-05-11 13:53:28 -06:00
parent 1309fa7082
commit c9d2611bb7
2 changed files with 9 additions and 0 deletions

View file

@ -44,6 +44,11 @@ describe "Model Base" do
@obj.database.should eql('database')
end
it "should support initialization block" do
@obj = Basic.new {|b| b.database = 'database'}
@obj.database.should eql('database')
end
end
describe "ActiveModel compatability Basic" do