From 1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Sun, 13 May 2018 11:26:10 +0900 Subject: Fix `CustomCops/AssertNot` to allow it to have failure message Follow up of #32605. --- activerecord/test/cases/associations_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'activerecord/test/cases/associations_test.rb') diff --git a/activerecord/test/cases/associations_test.rb b/activerecord/test/cases/associations_test.rb index fce2a7eed1..739eb02e0c 100644 --- a/activerecord/test/cases/associations_test.rb +++ b/activerecord/test/cases/associations_test.rb @@ -92,7 +92,7 @@ class AssociationsTest < ActiveRecord::TestCase firm.clients.reload - assert !firm.clients.empty?, "New firm should have reloaded client objects" + assert_not firm.clients.empty?, "New firm should have reloaded client objects" assert_equal 1, firm.clients.size, "New firm should have reloaded clients count" end @@ -102,8 +102,8 @@ class AssociationsTest < ActiveRecord::TestCase has_many_reflections = [Tag.reflect_on_association(:taggings), Developer.reflect_on_association(:projects)] mixed_reflections = (belongs_to_reflections + has_many_reflections).uniq assert using_limitable_reflections.call(belongs_to_reflections), "Belong to associations are limitable" - assert !using_limitable_reflections.call(has_many_reflections), "All has many style associations are not limitable" - assert !using_limitable_reflections.call(mixed_reflections), "No collection associations (has many style) should pass" + assert_not using_limitable_reflections.call(has_many_reflections), "All has many style associations are not limitable" + assert_not using_limitable_reflections.call(mixed_reflections), "No collection associations (has many style) should pass" end def test_association_with_references -- cgit v1.2.3