Class: GLRubocop::GLCops::NoStubbingPerformAsync
- Inherits:
-
RuboCop::Cop::Cop
- Object
- RuboCop::Cop::Cop
- GLRubocop::GLCops::NoStubbingPerformAsync
- Defined in:
- lib/gl_rubocop/gl_cops/no_stubbing_perform_async.rb
Overview
Bad:
allow(ExampleWorker).to receive(:perform_async)
expect(ExampleWorker).to receive(:perform_async)
expect(SomeWorker).not_to have_received(:perform_in)
Constant Summary collapse
- MSG =
"Don't stub perform async. Use the rspec-sidekick matchers instead: " \ 'expect(JobClass).to have_enqueued_sidekiq_job'.freeze
Instance Method Summary collapse
Instance Method Details
#on_send(node) ⇒ Object
40 41 42 |
# File 'lib/gl_rubocop/gl_cops/no_stubbing_perform_async.rb', line 40 def on_send(node) check_expectation(node) || check_allow(node) end |