aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/validations_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/validations_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/validations_test.rb')
-rw-r--r--activerecord/test/cases/validations_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/validations_test.rb b/activerecord/test/cases/validations_test.rb
index 6c83bbd15c..a33877f43a 100644
--- a/activerecord/test/cases/validations_test.rb
+++ b/activerecord/test/cases/validations_test.rb
@@ -39,7 +39,7 @@ class ValidationsTest < ActiveRecord::TestCase
def test_valid_using_special_context
r = WrongReply.new(title: "Valid title")
- assert !r.valid?(:special_case)
+ assert_not r.valid?(:special_case)
assert_equal "Invalid", r.errors[:author_name].join
r.author_name = "secret"
@@ -125,7 +125,7 @@ class ValidationsTest < ActiveRecord::TestCase
def test_save_without_validation
reply = WrongReply.new
- assert !reply.save
+ assert_not reply.save
assert reply.save(validate: false)
end