Sha256: 892f2d57e0fb98bf67d3288d2ebd23923dc66022cb2a8d4728999f1a598b856d
Contents?: true
Size: 551 Bytes
Versions: 7
Compression:
Stored size: 551 Bytes
Contents
# frozen_string_literal: true module RuboCop module Cop module Minitest # This cop enforces the test to use `assert_empty` # instead of using `assert(object.empty?)`. # # @example # # bad # assert(object.empty?) # assert(object.empty?, 'message') # # # good # assert_empty(object) # assert_empty(object, 'message') # class AssertEmpty < Base extend MinitestCopRule define_rule :assert, target_method: :empty? end end end end
Version data entries
7 entries across 7 versions & 1 rubygems