aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/query_cache_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/query_cache_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/query_cache_test.rb')
-rw-r--r--activerecord/test/cases/query_cache_test.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/activerecord/test/cases/query_cache_test.rb b/activerecord/test/cases/query_cache_test.rb
index 393f363e37..0f990bac9d 100644
--- a/activerecord/test/cases/query_cache_test.rb
+++ b/activerecord/test/cases/query_cache_test.rb
@@ -483,14 +483,14 @@ class QueryCacheTest < ActiveRecord::TestCase
def assert_cache(state, connection = ActiveRecord::Base.connection)
case state
when :off
- assert !connection.query_cache_enabled, "cache should be off"
+ assert_not connection.query_cache_enabled, "cache should be off"
assert connection.query_cache.empty?, "cache should be empty"
when :clean
assert connection.query_cache_enabled, "cache should be on"
assert connection.query_cache.empty?, "cache should be empty"
when :dirty
assert connection.query_cache_enabled, "cache should be on"
- assert !connection.query_cache.empty?, "cache should be dirty"
+ assert_not connection.query_cache.empty?, "cache should be dirty"
else
raise "unknown state"
end