Sha256: 3541e41da91584fb92fc8a366225b350dc888d772980a8968e570aa1a5478536

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      module Rails
        # @!parse
        #   # Check if using Minitest-like matchers.
        #   #
        #   # Check the use of minitest-like matchers
        #   # starting with `assert_` or `refute_`.
        #   #
        #   # @example
        #   #   # bad
        #   #   assert_equal(a, b)
        #   #   assert_equal a, b, "must be equal"
        #   #   assert_not_includes a, b
        #   #   refute_equal(a, b)
        #   #   assert_nil a
        #   #   refute_empty(b)
        #   #   assert_true(a)
        #   #   assert_false(a)
        #   #
        #   #   # good
        #   #   expect(b).to eq(a)
        #   #   expect(b).to(eq(a), "must be equal")
        #   #   expect(a).not_to include(b)
        #   #   expect(b).not_to eq(a)
        #   #   expect(a).to eq(nil)
        #   #   expect(a).not_to be_empty
        #   #   expect(a).to be(true)
        #   #   expect(a).to be(false)
        #   #
        #   class MinitestAssertions < RuboCop::Cop::RSpecRails::Base; end
        MinitestAssertions = ::RuboCop::Cop::RSpecRails::MinitestAssertions
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rubocop-rspec-2.28.0 lib/rubocop/cop/rspec/rails/minitest_assertions.rb