class InheritanceAttributeTest
Public Instance Methods
test_inheritance_new_with_subclass_as_default()
click to toggle source
# File activerecord/test/cases/inheritance_test.rb, line 529 def test_inheritance_new_with_subclass_as_default startup = Company.new # without arguments assert_equal "InheritanceAttributeTest::Startup", startup.type assert_instance_of Startup, startup empire = Company.new(type: "InheritanceAttributeTest::Empire") # without arguments assert_equal "InheritanceAttributeTest::Empire", empire.type assert_instance_of Empire, empire end