Skip to content

Instantly share code, notes, and snippets.

@notahat
Created June 6, 2009 01:54
Show Gist options
  • Save notahat/124629 to your computer and use it in GitHub Desktop.
Save notahat/124629 to your computer and use it in GitHub Desktop.
it "should support single-table inheritance" do
Person.blueprint { name "Fred" }
Admin.blueprint { name "Bill" }
person = Person.make
person.should_not be_new_record
person.name.should == "Fred"
person.type.should == nil
admin = Admin.make
admin.should_not be_new_record
admin.name.should == "Bill"
admin.type.should == "Admin"
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment