aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_methods_test.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2018-05-13 11:26:10 +0900
committerRyuta Kamizono <kamipo@gmail.com>2018-05-13 11:32:47 +0900
commit1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42 (patch)
tree3bb51baa159489c0ba9632d09f7f926ec3bc4147 /activerecord/test/cases/attribute_methods_test.rb
parent10b6c65dbcb0731c5bee815dc01f84a30983a871 (diff)
downloadrails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.gz
rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.tar.bz2
rails-1dc17e7b2e6814c3a6b476f93df4e8983d0a3e42.zip
Fix `CustomCops/AssertNot` to allow it to have failure message
Follow up of #32605.
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index 1a37ad963f..4a7427158a 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -354,9 +354,9 @@ class AttributeMethodsTest < ActiveRecord::TestCase
test "read_attribute when false" do
topic = topics(:first)
topic.approved = false
- assert !topic.approved?, "approved should be false"
+ assert_not topic.approved?, "approved should be false"
topic.approved = "false"
- assert !topic.approved?, "approved should be false"
+ assert_not topic.approved?, "approved should be false"
end
test "read_attribute when true" do
@@ -370,10 +370,10 @@ class AttributeMethodsTest < ActiveRecord::TestCase
test "boolean attributes writing and reading" do
topic = Topic.new
topic.approved = "false"
- assert !topic.approved?, "approved should be false"
+ assert_not topic.approved?, "approved should be false"
topic.approved = "false"
- assert !topic.approved?, "approved should be false"
+ assert_not topic.approved?, "approved should be false"
topic.approved = "true"
assert topic.approved?, "approved should be true"