Sha256: d4ccea638a0870a12cef6056c5e2c2185fd682de94931823fc08fe66648ed255

Contents?: true

Size: 1011 Bytes

Versions: 28

Compression:

Stored size: 1011 Bytes

Contents

# frozen_string_literal: true

module RuboCop
  module Cop
    module RSpec
      module Capybara
        # @!parse
        #   # Enforces use of `have_no_*` or `not_to` for negated expectations.
        #   #
        #   # @example EnforcedStyle: not_to (default)
        #   #   # bad
        #   #   expect(page).to have_no_selector
        #   #   expect(page).to have_no_css('a')
        #   #
        #   #   # good
        #   #   expect(page).not_to have_selector
        #   #   expect(page).not_to have_css('a')
        #   #
        #   # @example EnforcedStyle: have_no
        #   #   # bad
        #   #   expect(page).not_to have_selector
        #   #   expect(page).not_to have_css('a')
        #   #
        #   #   # good
        #   #   expect(page).to have_no_selector
        #   #   expect(page).to have_no_css('a')
        #   #
        #   class NegationMatcher < ::RuboCop::Cop::Base; end
        NegationMatcher = ::RuboCop::Cop::Capybara::NegationMatcher
      end
    end
  end
end

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
scrapbook-0.3.1 vendor/ruby/2.7.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/capybara/negation_matcher.rb
fablicop-1.10.2 vendor/bundle/ruby/3.2.0/gems/rubocop-rspec-2.22.0/lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.22.0 lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.21.0 lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.20.0 lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.19.0 lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.18.1 lib/rubocop/cop/rspec/capybara/negation_matcher.rb
rubocop-rspec-2.18.0 lib/rubocop/cop/rspec/capybara/negation_matcher.rb