Sha256: 47d8291e083bc35a6aee73b53edf7b41f11d3ea8620f39eae2275df69cf4c35b
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 `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 < Cop extend MinitestCopRule define_rule :assert, target_method: :include?, preferred_method: :assert_includes end end end end
Version data entries
10 entries across 10 versions & 1 rubygems