From 8c67e709d0b2946473af84959deaac0ced962d5e Mon Sep 17 00:00:00 2001 From: Jon Leighton Date: Fri, 23 Dec 2011 12:52:57 +0000 Subject: Add test for inheritance from a non-AR superclass --- activerecord/test/cases/inclusion_test.rb | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/inclusion_test.rb b/activerecord/test/cases/inclusion_test.rb index 07d538f6bc..d092e748e8 100644 --- a/activerecord/test/cases/inclusion_test.rb +++ b/activerecord/test/cases/inclusion_test.rb @@ -6,6 +6,14 @@ class BasicInclusionModelTest < ActiveRecord::TestCase Teapot.create!(:name => "Ronnie Kemper") assert_equal "Ronnie Kemper", Teapot.find(1).name end + + def test_inherited_model + teapot = CoolTeapot.create!(:name => "Bob") + teapot.reload + + assert_equal "Bob", teapot.name + assert_equal "mmm", teapot.aaahhh + end end class InclusionUnitTest < ActiveRecord::TestCase -- cgit v1.2.3