Class: RuboCop::Cop::Minitest::AssertIncludes

Inherits:
Base
  • Object
show all
Extended by:
RuboCop::Cop::MinitestCopRule
Defined in:
lib/rubocop/cop/minitest/assert_includes.rb

Overview

Enforces the test to use ‘assert_includes` instead of using `assert(collection.include?(object))`.

Examples:

# bad
assert(collection.include?(object))
assert(collection.include?(object), 'message')

# good
assert_includes(collection, object)
assert_includes(collection, object, 'message')

Method Summary

Methods included from RuboCop::Cop::MinitestCopRule

define_rule