lib/rubocop/cop/capybara/negation_matcher.rb in rubocop-capybara-2.19.0 vs lib/rubocop/cop/capybara/negation_matcher.rb in rubocop-capybara-2.20.0
- old
+ new
@@ -3,26 +3,26 @@
module RuboCop
module Cop
module Capybara
# Enforces use of `have_no_*` or `not_to` for negated expectations.
#
- # @example EnforcedStyle: not_to (default)
+ # @example EnforcedStyle: have_no (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')
+ #
+ # @example EnforcedStyle: not_to
+ # # 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')
#
class NegationMatcher < ::RuboCop::Cop::Base
extend AutoCorrector
include ConfigurableEnforcedStyle