diff options
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/base_test.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index 86d4a90fc4..dc5e912412 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1069,6 +1069,7 @@ class BasicsTest < ActiveRecord::TestCase def test_define_attr_method_with_block k = Class.new( ActiveRecord::Base ) + k.primary_key = "id" k.send(:define_attr_method, :primary_key) { "sys_" + original_primary_key } assert_equal "sys_id", k.primary_key end @@ -1109,6 +1110,7 @@ class BasicsTest < ActiveRecord::TestCase def test_set_primary_key_with_block k = Class.new( ActiveRecord::Base ) + k.primary_key = 'id' k.set_primary_key { "sys_" + original_primary_key } assert_equal "sys_id", k.primary_key end |