Sha256: 53b74c963541d77e716a32229e8b7824150a3c9072bebfd2cbca32925bd44fba
Contents?: true
Size: 838 Bytes
Versions: 32
Compression:
Stored size: 838 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `refute_predicate` # instead of using `refute(obj.a_predicate_method?)`. # # @example # # bad # refute(obj.one?) # refute(obj.one?, 'message') # # # good # refute_predicate(obj, :one?) # refute_predicate(obj, :one?, 'message') # class RefutePredicate < Base include ArgumentRangeHelper include PredicateAssertionHandleable extend AutoCorrector MSG = 'Prefer using `refute_predicate(%<new_arguments>s)`.' RESTRICT_ON_SEND = %i[refute].freeze # rubocop:disable InternalAffairs/UselessRestrictOnSend private def assertion_type 'refute' end end end end end
Version data entries
32 entries across 32 versions & 1 rubygems