Sha256: 052d3a512abdd136857d2c4ef1c9dee7445d3f322e5921b7da1876f86ce48c5a
Contents?: true
Size: 666 Bytes
Versions: 10
Compression:
Stored size: 666 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), 'message') # # # good # refute_includes(collection, object) # refute_includes(collection, object, 'message') # class RefuteIncludes < Cop extend MinitestCopRule define_rule :refute, target_method: :include?, preferred_method: :refute_includes end end end end
Version data entries
10 entries across 10 versions & 1 rubygems