aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/attribute_methods_test.rb
diff options
context:
space:
mode:
authorDaniel Colson <danieljamescolson@gmail.com>2018-04-17 18:21:34 -0400
committerDaniel Colson <danieljamescolson@gmail.com>2018-04-19 08:11:33 -0400
commita1ac18671a90869ef81d02f2eafe8104e4eea34f (patch)
tree03109650a8d23c4284fafb90c077ab03185805e9 /activerecord/test/cases/attribute_methods_test.rb
parent087e0ccb72e7a1491701dd1d1d49746f745d9d68 (diff)
downloadrails-a1ac18671a90869ef81d02f2eafe8104e4eea34f.tar.gz
rails-a1ac18671a90869ef81d02f2eafe8104e4eea34f.tar.bz2
rails-a1ac18671a90869ef81d02f2eafe8104e4eea34f.zip
Replace `assert !` with `assert_not`
This autocorrects the violations after adding a custom cop in 3305c78dcd.
Diffstat (limited to 'activerecord/test/cases/attribute_methods_test.rb')
-rw-r--r--activerecord/test/cases/attribute_methods_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/activerecord/test/cases/attribute_methods_test.rb b/activerecord/test/cases/attribute_methods_test.rb
index dc6638d45d..1a37ad963f 100644
--- a/activerecord/test/cases/attribute_methods_test.rb
+++ b/activerecord/test/cases/attribute_methods_test.rb
@@ -63,8 +63,8 @@ class AttributeMethodsTest < ActiveRecord::TestCase
t.author_name = ""
assert t.attribute_present?("title")
assert t.attribute_present?("written_on")
- assert !t.attribute_present?("content")
- assert !t.attribute_present?("author_name")
+ assert_not t.attribute_present?("content")
+ assert_not t.attribute_present?("author_name")
end
test "attribute_present with booleans" do
@@ -77,7 +77,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
assert b2.attribute_present?(:value)
b3 = Boolean.new
- assert !b3.attribute_present?(:value)
+ assert_not b3.attribute_present?(:value)
b4 = Boolean.new
b4.value = false
@@ -827,7 +827,7 @@ class AttributeMethodsTest < ActiveRecord::TestCase
self.table_name = "computers"
end
- assert !klass.instance_method_already_implemented?(:system)
+ assert_not klass.instance_method_already_implemented?(:system)
computer = klass.new
assert_nil computer.system
end
@@ -841,8 +841,8 @@ class AttributeMethodsTest < ActiveRecord::TestCase
self.table_name = "computers"
end
- assert !klass.instance_method_already_implemented?(:system)
- assert !subklass.instance_method_already_implemented?(:system)
+ assert_not klass.instance_method_already_implemented?(:system)
+ assert_not subklass.instance_method_already_implemented?(:system)
computer = subklass.new
assert_nil computer.system
end