Skip to content

Commit

Permalink
less gross
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris Sinjakli committed Jul 16, 2019
1 parent a80ac49 commit c288498
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
12 changes: 0 additions & 12 deletions spec/examples/metric_example.rb
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,5 @@
expect(subject.get(labels: { test: 'label' })).to be_a(type)
end
end

context "with non-string label values" do
subject { described_class.new(:foo, docstring: 'Labels', labels: [:test]) }

it "converts labels to strings for consistent storage" do
incrementor.call(test: :label)
expect(subject.get(labels: { test: 'label' })).to eq(1.0)
end

context "and all labels preset" do
end
end
end
end
13 changes: 12 additions & 1 deletion spec/prometheus/client/counter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@

it_behaves_like Prometheus::Client::Metric do
let(:type) { Float }
let(:incrementor) { ->(labels) { subject.increment(labels: labels); pp subject} }
end

describe '#increment' do
Expand Down Expand Up @@ -79,5 +78,17 @@
end.each(&:join)
end.to change { counter.get }.by(100.0)
end

context "with non-string label values" do
subject { described_class.new(:foo, docstring: 'Labels', labels: [:test]) }

it "converts labels to strings for consistent storage" do
subject.increment(labels: {test: :label})
expect(subject.get(labels: { test: 'label' })).to eq(1.0)
end

context "and all labels preset" do
end
end
end
end

0 comments on commit c288498

Please sign in to comment.