Module: RuboCop::Cop::Capybara::RSpec::ExplicitHelper

Extended by:
NodePattern::Macros
Included in:
PredicateMatcher
Defined in:
lib/rubocop/cop/capybara/rspec/predicate_matcher.rb

Overview

A helper for ‘explicit` style

Constant Summary collapse

MSG_EXPLICIT =
'Prefer using `%<predicate_name>s` over ' \
'`%<matcher_name>s` matcher.'
BUILT_IN_MATCHERS =
%w[
  be_truthy be_falsey be_falsy
  have_attributes have_received
  be_between be_within
].freeze
INFLECTED_MATCHER =
%w[css selector style xpath].each.map do |suffix|
  "match_#{suffix}"
end.freeze