File tree Expand file tree Collapse file tree 7 files changed +11
-8
lines changed
actionpack/test/controller
activerecord/test/cases/associations
railties/test/application Expand file tree Collapse file tree 7 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,9 @@ Performance/RedundantStringChars:
384384Performance/StringInclude :
385385 Enabled : true
386386
387+ Minitest/AssertNil :
388+ Enabled : true
389+
387390Minitest/AssertPredicate :
388391 Enabled : true
389392
Original file line number Diff line number Diff line change @@ -495,7 +495,7 @@ def test_post_then_get_with_parameters_do_not_leak_across_requests
495495 assert_equal "foo=bar" , request . env [ "QUERY_STRING" ]
496496 assert_equal "foo=bar" , request . query_string
497497 assert_equal "bar" , request . parameters [ "foo" ]
498- assert_predicate request . parameters [ "leaks" ] , :nil?
498+ assert_nil request . parameters [ "leaks" ]
499499 end
500500 end
501501
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ class ActionText::ModelTest < ActiveSupport::TestCase
1818 test "without content" do
1919 assert_difference ( "ActionText::RichText.count" => 0 ) do
2020 message = Message . create! ( subject : "Greetings" )
21- assert_predicate message . content , :nil?
21+ assert_nil message . content
2222 assert_predicate message . content , :blank?
2323 assert_predicate message . content , :empty?
2424 assert_not message . content?
@@ -146,7 +146,7 @@ class ActionText::ModelTest < ActiveSupport::TestCase
146146 test "with blank content and store_if_blank: false" do
147147 assert_difference ( "ActionText::RichText.count" => 0 ) do
148148 message = MessageWithoutBlanks . create! ( subject : "Greetings" , content : "" )
149- assert_predicate message . content , :nil?
149+ assert_nil message . content
150150 assert_predicate message . content , :blank?
151151 assert_predicate message . content , :empty?
152152 assert_not message . content?
Original file line number Diff line number Diff line change @@ -7,8 +7,8 @@ module Type
77 class BooleanTest < ActiveModel ::TestCase
88 def test_type_cast_boolean
99 type = Type ::Boolean . new
10- assert_predicate type . cast ( "" ) , :nil?
11- assert_predicate type . cast ( nil ) , :nil?
10+ assert_nil type . cast ( "" )
11+ assert_nil type . cast ( nil )
1212
1313 assert type . cast ( true )
1414 assert type . cast ( 1 )
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ def test_validation_with_if_and_on
252252
253253 # If block should not fire
254254 assert_predicate t , :valid?
255- assert_predicate t . author_name , :nil?
255+ assert_nil t . author_name
256256
257257 # If block should fire
258258 assert t . invalid? ( :update )
Original file line number Diff line number Diff line change @@ -1243,7 +1243,7 @@ def test_deleting_from_has_many_through_a_belongs_to_should_not_try_to_update_co
12431243
12441244 assert_includes post . author_addresses , address
12451245 post . author_addresses . delete ( address )
1246- assert_predicate post [ :author_count ] , :nil?
1246+ assert_nil post [ :author_count ]
12471247 end
12481248
12491249 def test_primary_key_option_on_source
Original file line number Diff line number Diff line change @@ -4028,7 +4028,7 @@ class Post < ActiveRecord::Base
40284028
40294029 app "development"
40304030
4031- assert_equal nil , ActiveStorage . variant_processor
4031+ assert_nil ActiveStorage . variant_processor
40324032 end
40334033
40344034 test "ActiveStorage.variant_processor uses vips by default" do
You can’t perform that action at this time.
0 commit comments