Sha256: 7dfae8d489312913d5a8a4fdc9cc440fb42840c297f761f41d2466e549457793
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 `assert_includes` # instead of using `assert(collection.include?(object))`. # # @example # # bad # assert(collection.include?(object)) # assert(collection.include?(object), 'the message') # # # good # assert_includes(collection, object) # assert_includes(collection, object, 'the message') # class AssertIncludes < Cop extend IncludesCopRule rule target_method: :assert, prefer_method: :assert_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/assert_includes.rb |
rubocop-minitest-0.6.1 | lib/rubocop/cop/minitest/assert_includes.rb |