Skip to content

Commit

Permalink
Remove explicit instance in tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
ioquatix committed Jan 11, 2025
1 parent ef302db commit 9723ec4
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions test/traces/backend/open_telemetry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,6 @@ def my_span_and_context
end

it "can invoke trace wrapper" do
instance = MyClass.new

expect(Traces::Backend::OpenTelemetry::TRACER).to receive(:start_span).with_options(have_keys(
attributes: be == {"argument" => 10}
))
Expand All @@ -54,16 +52,12 @@ def my_span_and_context
end

it "can invoke trace wrapper without attributes" do
instance = MyClass.new

expect(Traces::Backend::OpenTelemetry::TRACER).to receive(:start_span)

instance.my_method_without_attributes(10)
end

it "can invoke trace wrapper with exception" do
instance = MyClass.new

expect(Traces::Backend::OpenTelemetry::TRACER).to receive(:start_span)

expect do
Expand Down

0 comments on commit 9723ec4

Please sign in to comment.