From 94333a4c31bd10c1f358c538a167e6a4589bae2d Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Thu, 25 Jan 2018 18:14:09 -0500 Subject: Use assert_predicate and assert_not_predicate --- actionpack/test/controller/flash_hash_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/flash_hash_test.rb') diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb index f31a4d9329..fd0d147cba 100644 --- a/actionpack/test/controller/flash_hash_test.rb +++ b/actionpack/test/controller/flash_hash_test.rb @@ -92,11 +92,11 @@ module ActionDispatch end def test_empty? - assert @hash.empty? + assert_predicate @hash, :empty? @hash["zomg"] = "bears" - assert !@hash.empty? + assert_not_predicate @hash, :empty? @hash.clear - assert @hash.empty? + assert_predicate @hash, :empty? end def test_each -- cgit v1.2.3 From 82c39e1a0b5114e2d89a80883a41090567a83196 Mon Sep 17 00:00:00 2001 From: Daniel Colson Date: Thu, 25 Jan 2018 18:16:57 -0500 Subject: Use assert_empty and assert_not_empty --- actionpack/test/controller/flash_hash_test.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'actionpack/test/controller/flash_hash_test.rb') diff --git a/actionpack/test/controller/flash_hash_test.rb b/actionpack/test/controller/flash_hash_test.rb index fd0d147cba..6c3ac26de1 100644 --- a/actionpack/test/controller/flash_hash_test.rb +++ b/actionpack/test/controller/flash_hash_test.rb @@ -92,11 +92,11 @@ module ActionDispatch end def test_empty? - assert_predicate @hash, :empty? + assert_empty @hash @hash["zomg"] = "bears" - assert_not_predicate @hash, :empty? + assert_not_empty @hash @hash.clear - assert_predicate @hash, :empty? + assert_empty @hash end def test_each -- cgit v1.2.3