Skip to content

Commit

Permalink
Provide more complex example for #2015
Browse files Browse the repository at this point in the history
  • Loading branch information
JonRowe committed Jul 23, 2018
1 parent 30426ce commit 5da6e2a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/rspec/rails/matchers/active_job.rb
Expand Up @@ -244,9 +244,8 @@ def matches?(job)
# expect {
# HelloJob.perform_later('rspec_rails', %w[ world rspec rails ], 42)
# }.to have_enqueued_job.with { |_from, to, times|
# # I don't want to check argument `from`
# expect(to).to include 'rspec'
# expect(times).to eq 42
# # Perform more complex argument matching using dynamic arguments
# expect(from).to include "_#{to}"

This comment has been minimized.

Copy link
@SzNagyMisu

SzNagyMisu Jul 24, 2018

I don't really get this one... Where do you get from from? Did you mean: _from? And why sould 'rspec_rails' include "_[\"world\", \"rspec\", \"rails\"]"?

This comment has been minimized.

Copy link
@JonRowe

JonRowe Jul 24, 2018

Author Member

Good point, updated, the point was to make a more complex example that needs a block!

# }
def have_enqueued_job(job = nil)
check_active_job_adapter
Expand Down

0 comments on commit 5da6e2a

Please sign in to comment.