Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove deprecated method "have_enqueued_job" #175

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,9 +147,6 @@ AwesomeJob.perform_async 'Awesome', true
# test with...
expect(AwesomeJob).to have_enqueued_sidekiq_job('Awesome', true)

# Code written with older versions of the gem may use the deprecated
# have_enqueued_job matcher.
expect(AwesomeJob).to have_enqueued_job('Awesome', true)
```

#### Testing scheduled jobs
Expand Down
5 changes: 0 additions & 5 deletions lib/rspec/sidekiq/matchers/have_enqueued_job.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,6 @@ def have_enqueued_sidekiq_job(*expected_arguments)
HaveEnqueuedJob.new expected_arguments
end

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)
end

class JobOptionParser
attr_reader :job

Expand Down
14 changes: 0 additions & 14 deletions spec/rspec/sidekiq/matchers/have_enqueued_job_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -90,20 +90,6 @@
end
end

describe '#have_enqueued_job' do
it 'returns instance' do
expect(have_enqueued_job).to be_a RSpec::Sidekiq::Matchers::HaveEnqueuedJob
end

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
it 'returns description' do
argument_subject.matches? worker
Expand Down