Skip to content

Commit

Permalink
Add failing test for my scenario
Browse files Browse the repository at this point in the history
  • Loading branch information
tylerwillingham committed Oct 11, 2024
1 parent 58b17f0 commit b4a743c
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions spec/datadog/tracing/contrib/rails/runner_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,6 +136,14 @@
expect(span.get_tag('operation')).to eq('runner.inline')
end

context "when a current span isn't detected" do
it "skips setting the source tag" do
allow(Datadog::Tracing).to receive(:active_span).and_return(nil)

expect { run }.to output('OK').to_stdout
end
end

include_context 'with a custom service name'
include_context 'with source code too long'

Expand Down

0 comments on commit b4a743c

Please sign in to comment.