Module: RuboCop::Cop::Workit::RSpecPredicateMatcherBase
- Includes:
- ConfigurableEnforcedStyle, RSpecExplicitHelp, RSpecInflectedHelp
- Included in:
- RSpecCapybaraPredicateMatcher
- Defined in:
- lib/rubocop/cop/workit/mixin/rspec_predicate_matcher_base.rb
Overview
Helper methods for Predicate matcher.
Constant Summary collapse
- RESTRICT_ON_SEND =
%i[to to_not not_to].freeze
Constants included from RSpecExplicitHelp
RuboCop::Cop::Workit::RSpecExplicitHelp::BUILT_IN_MATCHERS, RuboCop::Cop::Workit::RSpecExplicitHelp::MSG_EXPLICIT
Constants included from RSpecInflectedHelp
RuboCop::Cop::Workit::RSpecInflectedHelp::MSG_INFLECTED
Instance Method Summary collapse
-
#on_block(node) ⇒ Object
rubocop:disable InternalAffairs/NumblockHandler.
- #on_send(node) ⇒ Object
Instance Method Details
#on_block(node) ⇒ Object
rubocop:disable InternalAffairs/NumblockHandler
23 24 25 |
# File 'lib/rubocop/cop/workit/mixin/rspec_predicate_matcher_base.rb', line 23 def on_block(node) # rubocop:disable InternalAffairs/NumblockHandler check_explicit(node) if style == :explicit end |
#on_send(node) ⇒ Object
14 15 16 17 18 19 20 21 |
# File 'lib/rubocop/cop/workit/mixin/rspec_predicate_matcher_base.rb', line 14 def on_send(node) case style when :inflected check_inflected(node) when :explicit check_explicit(node) end end |