Skip to content

Commit

Permalink
Merge pull request #136 from aprescott/have-enqueued-splat-args
Browse files Browse the repository at this point in the history
Re-splat arguments for the have_enqueued_job alias
  • Loading branch information
packrat386 authored Jun 23, 2017
2 parents 280877e + 7934bba commit 8843be9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion lib/rspec/sidekiq/matchers/have_enqueued_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ def have_enqueued_sidekiq_job(*expected_arguments)

def have_enqueued_job(*expected_arguments)
warn "[DEPRECATION] `have_enqueued_job` is deprecated. Please use `have_enqueued_sidekiq_job` instead."
have_enqueued_sidekiq_job(expected_arguments)
have_enqueued_sidekiq_job(*expected_arguments)
end

class JobOptionParser
Expand Down
4 changes: 4 additions & 0 deletions spec/rspec/sidekiq/matchers/have_enqueued_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
it 'provides deprecation warning' do
expect { have_enqueued_job }.to output(/[DEPRECATION]/).to_stderr
end

it 'matches the same way have_enqueued_sidekiq_job does' do
expect(worker).to have_enqueued_job *worker_args
end
end

describe '#description' do
Expand Down

0 comments on commit 8843be9

Please sign in to comment.