From a1ac18671a90869ef81d02f2eafe8104e4eea34f Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Tue, 17 Apr 2018 18:21:34 -0400 Subject: Replace `assert !` with `assert_not` This autocorrects the violations after adding a custom cop in 3305c78dcd. --- activesupport/test/cache/cache_store_namespace_test.rb | 4 ++-- activesupport/test/cache/stores/memory_store_test.rb | 2 +- activesupport/test/cache/stores/redis_cache_store_test.rb | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) (limited to 'activesupport/test/cache') diff --git a/activesupport/test/cache/cache_store_namespace_test.rb b/activesupport/test/cache/cache_store_namespace_test.rb index b52a61c500..dfdb3262f2 100644 --- a/activesupport/test/cache/cache_store_namespace_test.rb +++ b/activesupport/test/cache/cache_store_namespace_test.rb @@ -25,7 +25,7 @@ class CacheStoreNamespaceTest < ActiveSupport::TestCase cache.write("foo", "bar") cache.write("fu", "baz") cache.delete_matched(/^fo/) - assert !cache.exist?("foo") + assert_not cache.exist?("foo") assert cache.exist?("fu") end @@ -34,7 +34,7 @@ class CacheStoreNamespaceTest < ActiveSupport::TestCase cache.write("foo", "bar") cache.write("fu", "baz") cache.delete_matched(/OO/i) - assert !cache.exist?("foo") + assert_not cache.exist?("foo") assert cache.exist?("fu") end end diff --git a/activesupport/test/cache/stores/memory_store_test.rb b/activesupport/test/cache/stores/memory_store_test.rb index 8fe8384fb0..340fb517cb 100644 --- a/activesupport/test/cache/stores/memory_store_test.rb +++ b/activesupport/test/cache/stores/memory_store_test.rb @@ -104,7 +104,7 @@ class MemoryStorePruningTest < ActiveSupport::TestCase assert @cache.exist?(4) assert @cache.exist?(3) assert @cache.exist?(2) - assert !@cache.exist?(1) + assert_not @cache.exist?(1) end def test_write_with_unless_exist diff --git a/activesupport/test/cache/stores/redis_cache_store_test.rb b/activesupport/test/cache/stores/redis_cache_store_test.rb index 3cae2bb11f..24c4c5c481 100644 --- a/activesupport/test/cache/stores/redis_cache_store_test.rb +++ b/activesupport/test/cache/stores/redis_cache_store_test.rb @@ -211,7 +211,7 @@ module ActiveSupport::Cache::RedisCacheStoreTests @cache.write("foo", "bar") @cache.write("fu", "baz") @cache.delete_matched("foo*") - assert !@cache.exist?("foo") + assert_not @cache.exist?("foo") assert @cache.exist?("fu") end @@ -227,15 +227,15 @@ module ActiveSupport::Cache::RedisCacheStoreTests @cache.write("foo", "bar") @cache.write("fu", "baz") @cache.clear - assert !@cache.exist?("foo") - assert !@cache.exist?("fu") + assert_not @cache.exist?("foo") + assert_not @cache.exist?("fu") end test "only clear namespace cache key" do @cache.write("foo", "bar") @cache.redis.set("fu", "baz") @cache.clear - assert !@cache.exist?("foo") + assert_not @cache.exist?("foo") assert @cache.redis.exists("fu") end end -- cgit v1.2.3