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

migrate sucker_punch tests from minitest to rspec #1128

Merged
merged 6 commits into from
Aug 13, 2020
Merged
Prev Previous commit
try setting span directlly in rspec tests
  • Loading branch information
ericmustin committed Aug 12, 2020
commit ddff680ebfead7052b733aef5ebeebff385af34c
3 changes: 3 additions & 0 deletions spec/ddtrace/contrib/sucker_punch/patcher_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def perform(action = :none)
subject(:dummy_worker_success) { worker_class.perform_async }
let(:job_span) { spans.find { |s| s.resource[/PROCESS/] } }
let(:enqueue_span) { spans.find { |s| s.resource[/ENQUEUE/] } }
let(:span) { spans.first }

it_behaves_like 'measured span for integration', true do
before do
Expand Down Expand Up @@ -78,6 +79,7 @@ def perform(action = :none)
context 'failed job' do
subject(:dummy_worker_fail) { worker_class.perform_async(:fail) }
let(:job_span) { spans.find { |s| s.resource[/PROCESS/] } }
let(:span) { spans.first }

it_behaves_like 'measured span for integration', true do
before do
Expand All @@ -103,6 +105,7 @@ def perform(action = :none)
context 'delayed job' do
subject(:dummy_worker_delay) { worker_class.perform_in(0) }
let(:enqueue_span) { spans.find { |s| s.resource[/ENQUEUE/] } }
let(:span) { spans.first }

it_behaves_like 'measured span for integration', true do
before do
Expand Down