Sha256: ae0d6364338e0185b03e4f391e6bbec979a92167ec72db74409a4b656e8959f8
Contents?: true
Size: 658 Bytes
Versions: 34
Compression:
Stored size: 658 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # Enforces the test to use `assert_includes` # instead of using `assert(collection.include?(object))`. # # @example # # bad # assert(collection.include?(object)) # assert(collection.include?(object), 'message') # # # good # assert_includes(collection, object) # assert_includes(collection, object, 'message') # class AssertIncludes < Base extend MinitestCopRule define_rule :assert, target_method: :include?, preferred_method: :assert_includes end end end end
Version data entries
34 entries across 34 versions & 1 rubygems