spec/lib/tabs/metrics/counter_spec.rb in tabs-0.5.2 vs spec/lib/tabs/metrics/counter_spec.rb in tabs-0.5.3
- old
+ new
@@ -14,9 +14,18 @@
stats = metric.stats(((now - 2.hours)..(now + 4.hours)), :hour)
expect(stats).to include({ time => 1 })
end
end
+ describe "total count" do
+
+ it "is incremented every time regardless of resolution" do
+ 30.times { metric.increment }
+ expect(metric.total).to eq(30)
+ end
+
+ end
+
describe "retrieving stats" do
before do
Timecop.freeze(now)
end