Skip to content

Commit

Permalink
Add a couple of missing Timecop.return
Browse files Browse the repository at this point in the history
  • Loading branch information
gudmundur committed Dec 9, 2016
1 parent bcacd02 commit fa5062d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@
Pliny::Metrics.backends = [test_backend]
end

after do
Timecop.return
end

it "measures a block's execution time with a single key" do
metrics.measure(:foo) { }
expect(test_backend).to have_received(:report_measures).once.with(
Expand Down
4 changes: 4 additions & 0 deletions spec/middleware/metrics_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ def app
allow(Pliny::Metrics).to receive(:measure)
end

after do
Timecop.return
end

it "counts total requests" do
expect(Pliny::Metrics).to receive(:count).with("requests").once

Expand Down

0 comments on commit fa5062d

Please sign in to comment.