Class: RuboCop::Cop::RSpec::VoidExpect
- Defined in:
- lib/rubocop/cop/rspec/void_expect.rb
Overview
This cop checks void ‘expect()`.
Constant Summary collapse
- MSG =
'Do not use `expect()` without `.to` or `.not_to`. ' \ 'Chain the methods or remove it.'.freeze
Constants inherited from Cop
Cop::DEFAULT_CONFIGURATION, Cop::DEFAULT_PATTERN_RE
Constants included from RSpec::Language
Instance Method Summary collapse
Methods inherited from Cop
Instance Method Details
#on_block(node) ⇒ Object
31 32 33 34 |
# File 'lib/rubocop/cop/rspec/void_expect.rb', line 31 def on_block(node) return unless expect_block?(node) check_expect(node) end |
#on_send(node) ⇒ Object
26 27 28 29 |
# File 'lib/rubocop/cop/rspec/void_expect.rb', line 26 def on_send(node) return unless expect?(node) check_expect(node) end |