diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-18 16:09:58 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-18 17:30:46 +0900 |
commit | 5349d4ee080ff6da892081eae871a195847353c1 (patch) | |
tree | 60c6ebacfc509551b8eadb5ed74a5f66791cd200 /activerecord/test/cases/associations/inverse_associations_test.rb | |
parent | 044f8bdf625dae78e4e230b9c61d9881864e2def (diff) | |
download | rails-5349d4ee080ff6da892081eae871a195847353c1.tar.gz rails-5349d4ee080ff6da892081eae871a195847353c1.tar.bz2 rails-5349d4ee080ff6da892081eae871a195847353c1.zip |
:warning: "Use assert_nil if expecting nil. This will fail in MT6."
These are followups for 307065f959f2b34bdad16487bae906eb3bfeaf28,
but TBH I'm personally not very much confortable with this style.
Maybe we could override assert_equal in our test_helper not to warn?
Diffstat (limited to 'activerecord/test/cases/associations/inverse_associations_test.rb')
-rw-r--r-- | activerecord/test/cases/associations/inverse_associations_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/associations/inverse_associations_test.rb b/activerecord/test/cases/associations/inverse_associations_test.rb index 6fe6ee6783..287b3e9ebc 100644 --- a/activerecord/test/cases/associations/inverse_associations_test.rb +++ b/activerecord/test/cases/associations/inverse_associations_test.rb @@ -443,7 +443,7 @@ class InverseHasManyTests < ActiveRecord::TestCase assert man.equal?(man.interests.first.man), "Two inverses should lead back to the same object that was originally held" assert man.equal?(man.interests.find(interest.id).man), "Two inversions should lead back to the same object that was originally held" - assert_equal man.name, man.interests.find(interest.id).man.name, "The name of the man should match before the name is changed" + assert_nil man.interests.find(interest.id).man.name, "The name of the man should match before the name is changed" man.name = "Ben Bitdiddle" assert_equal man.name, man.interests.find(interest.id).man.name, "The name of the man should match after the parent name is changed" man.interests.find(interest.id).man.name = "Alyssa P. Hacker" |