aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorSean Griffin <sean@thoughtbot.com>2014-10-28 17:43:58 -0600
committerSean Griffin <sean@thoughtbot.com>2014-10-28 17:43:58 -0600
commit21f081c0ca86df65c2598e3a273a4c9a785dd5d6 (patch)
tree5b1cac6bf3f2ef783784c2c9706049deaafc58ed /activerecord/test/cases
parente13ac306a09611c2d7f7e3ca813e8409d7dfc834 (diff)
downloadrails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.tar.gz
rails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.tar.bz2
rails-21f081c0ca86df65c2598e3a273a4c9a785dd5d6.zip
💣
We were relying on hash inequality in tests
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/base_test.rb5
1 files changed, 4 insertions, 1 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