aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/inheritance_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/inheritance_test.rb')
-rw-r--r--activerecord/test/cases/inheritance_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/inheritance_test.rb b/activerecord/test/cases/inheritance_test.rb
index 3d3189900f..19655a2d38 100644
--- a/activerecord/test/cases/inheritance_test.rb
+++ b/activerecord/test/cases/inheritance_test.rb
@@ -240,7 +240,7 @@ class InheritanceTest < ActiveRecord::TestCase
cabbage = vegetable.becomes!(Cabbage)
assert_equal "Cabbage", cabbage.custom_type
- vegetable = cabbage.becomes!(Vegetable)
+ cabbage.becomes!(Vegetable)
assert_nil cabbage.custom_type
end
@@ -654,7 +654,7 @@ class InheritanceAttributeMappingTest < ActiveRecord::TestCase
assert_equal ["omg_inheritance_attribute_mapping_test/company"], ActiveRecord::Base.connection.select_values("SELECT sponsorable_type FROM sponsors")
- sponsor = Sponsor.first
+ sponsor = Sponsor.find(sponsor.id)
assert_equal startup, sponsor.sponsorable
end
end