Sha256: 09137f3ffcb1d6049d4ac46014058b0338e6317545adeabfb59860e815973a28

Contents?: true

Size: 653 Bytes

Versions: 2

Compression:

Stored size: 653 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Minitest
      # This cop enforces the test to use `refute_includes`
      # instead of using `refute(collection.include?(object))`.
      #
      # @example
      #   # bad
      #   refute(collection.include?(object))
      #   refute(collection.include?(object), 'the message')
      #
      #   # good
      #   refute_includes(collection, object)
      #   refute_includes(collection, object, 'the message')
      #
      class RefuteIncludes < Cop
        extend IncludesCopRule

        rule target_method: :refute, prefer_method: :refute_includes
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
rubocop-minitest-0.6.2 lib/rubocop/cop/minitest/refute_includes.rb
rubocop-minitest-0.6.1 lib/rubocop/cop/minitest/refute_includes.rb