Skip to content

Commit

Permalink
Re-add tracer_tests for name and version
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlaurin committed May 25, 2020
1 parent ec04cac commit 09aa570
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions sdk/test/opentelemetry/sdk/trace/tracer_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,18 @@
->(trace_id:, span_id:, parent_context:, links:, name:, kind:, attributes:) { Result.new(decision: Decision::RECORD) } # rubocop:disable Lint/UnusedBlockArgument
end

describe '#name' do
it 'reflects the name passed in' do
_(Tracer.new('component', 'semver:1.0').name).must_equal('component')
end
end

describe '#version' do
it 'reflects the version passed in' do
_(Tracer.new('component', 'semver:1.0').version).must_equal('semver:1.0')
end
end

describe '#start_root_span' do
it 'provides a default name' do
_(tracer.start_root_span(nil).name).wont_be_nil
Expand Down

0 comments on commit 09aa570

Please sign in to comment.