Sha256: ae4d7e6346419625b3b16a0e3d0e4d885f8a7509d08e8e69feb13ffe17025dc6

Contents?: true

Size: 527 Bytes

Versions: 24

Compression:

Stored size: 527 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module Minitest
      # 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 < Base
        extend MinitestCopRule

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

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rubocop-minitest-0.32.2 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.32.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.32.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.31.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.31.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.30.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.29.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.28.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.27.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.26.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.26.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.25.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.25.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.24.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.23.2 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.23.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.23.0 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.22.2 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.22.1 lib/rubocop/cop/minitest/assert_equal.rb
rubocop-minitest-0.22.0 lib/rubocop/cop/minitest/assert_equal.rb