spec/gauge_spec.rb in fnordmetric-1.0.1 vs spec/gauge_spec.rb in fnordmetric-1.2.0
- old
+ new
@@ -20,13 +20,18 @@
it "should return the correct tick if configured" do
gauge = FnordMetric::Gauge.new({:tick => 23, :key_prefix => "fnordmetrics-myns", :key => "mygauge"})
gauge.tick.should == 23
end
+ it "should return the correct tick if configured with flush_interval" do
+ gauge = FnordMetric::Gauge.new({:flush_interval => 42, :key_prefix => "fnordmetrics-myns", :key => "mygauge"})
+ gauge.tick.should == 42
+ end
+
it "should return the default tick if none configured" do
gauge = FnordMetric::Gauge.new({:key_prefix => "fnordmetrics-myns", :key => "mygauge"})
- gauge.tick.should == 3600
+ gauge.tick.should == FnordMetric.options[:default_flush_interval]
end
it "should return the correct tick_at" do
gauge = FnordMetric::Gauge.new({:tick => 10, :key_prefix => "fnordmetrics-myns", :key => "mygauge"})
gauge.tick_at(@now).should == 695280200
@@ -220,6 +225,6 @@
vals[0].should == ["uberfoo", 23/3.0]
vals[1].should == ["fnordyblubb", 18/3.0]
end
end
-end
\ No newline at end of file
+end