spec/summary_spec.rb in redistat-0.2.3 vs spec/summary_spec.rb in redistat-0.2.4

- old
+ new

@@ -44,9 +44,18 @@ summary.should have(0).items end end end + it "should update summaries even if no label is set" do + key = Redistat::Key.new(@scope, nil, @date, {:depth => :day}) + Redistat::Summary.update(key, @stats, :hour) + summary = db.hgetall(key.to_s(:hour)) + summary.should have(2).items + summary["views"].should == "3" + summary["visitors"].should == "2" + end + it "should inject stats key grouping summaries" do hash = { "count/hello" => 3, "count/world" => 7, "death/bomb" => 4, "death/unicorn" => 3, :"od/sugar" => 7, :"od/meth" => 8 } res = Redistat::Summary.send(:inject_group_summaries, hash)