diff options
author | Sean Griffin <sean@thoughtbot.com> | 2014-10-28 17:43:58 -0600 |
---|---|---|
committer | Sean Griffin <sean@thoughtbot.com> | 2014-10-28 17:43:58 -0600 |
commit | 21f081c0ca86df65c2598e3a273a4c9a785dd5d6 (patch) | |
tree | 5b1cac6bf3f2ef783784c2c9706049deaafc58ed | |
parent | e13ac306a09611c2d7f7e3ca813e8409d7dfc834 (diff) | |
download | rails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.tar.gz rails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.tar.bz2 rails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.zip |
💣
We were relying on hash inequality in tests
-rw-r--r-- | activerecord/test/cases/base_test.rb | 5 | ||||
-rw-r--r-- | activerecord/test/schema/schema.rb | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/activerecord/test/cases/base_test.rb b/activerecord/test/cases/base_test.rb index fb535e74fc..4ad27c0e8d 100644 --- a/activerecord/test/cases/base_test.rb +++ b/activerecord/test/cases/base_test.rb @@ -1383,7 +1383,10 @@ class BasicsTest < ActiveRecord::TestCase c1 = Post.connection.schema_cache.columns('posts') ActiveRecord::Base.clear_cache! c2 = Post.connection.schema_cache.columns('posts') - assert_not_equal c1, c2 + c1.each_with_index do |v, i| + assert_not_same v, c2[i] + end + assert_equal c1, c2 end def test_current_scope_is_reset diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index 10de3d34cb..2b68236256 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -311,7 +311,7 @@ ActiveRecord::Schema.define do end create_table :cold_jokes, force: true do |t| - t.string :name + t.string :cold_name end create_table :friendships, force: true do |t| |