Support providing an initialization block when creating new models
This commit is contained in:
parent
1309fa7082
commit
c9d2611bb7
2 changed files with 9 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue