lib/rubocop/cop/mixin/minitest_cop_rule.rb in rubocop-minitest-0.8.0 vs lib/rubocop/cop/mixin/minitest_cop_rule.rb in rubocop-minitest-0.8.1

- old
+ new

@@ -20,12 +20,10 @@ # `assertion_method` and `target_method` with `_` is # the default name. # @param inverse [Boolean] An optional param. Order of arguments replaced by auto-correction. # def define_rule(assertion_method, target_method:, preferred_method: nil, inverse: false) - if preferred_method.nil? - preferred_method = "#{assertion_method}_#{target_method.to_s.delete('?')}" - end + preferred_method = "#{assertion_method}_#{target_method.to_s.delete('?')}" if preferred_method.nil? class_eval(<<~RUBY, __FILE__, __LINE__ + 1) include ArgumentRangeHelper MSG = 'Prefer using `#{preferred_method}(%<new_arguments>s)` over ' \