Sha256: 8d86dd9ae8a5f824edd40855717cf70a6d3a45c6ea2d3dc32abc512dc80af0f7

Contents?: true

Size: 535 Bytes

Versions: 9

Compression:

Stored size: 535 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Minitest
      # This cop enforces the use of `assert_equal(expected, actual)`
      # over `assert(expected == actual)`.
      #
      # @example
      #   # bad
      #   assert("rubocop-minitest" == actual)
      #
      #   # good
      #   assert_equal("rubocop-minitest", actual)
      #
      class AssertEqual < Cop
        extend MinitestCopRule

        define_rule :assert, target_method: :==, preferred_method: :assert_equal
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
rubocop-minitest-0.11.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.11.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.10.3 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.10.2 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.10.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.10.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.9.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.8.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.8.0 lib/rubocop/cop/minitest/assert_equal.rb