spec/key_spec.rb in redistat-0.2.3 vs spec/key_spec.rb in redistat-0.2.4
- old
+ new
@@ -26,9 +26,11 @@
props = [:year, :month, :day, :hour, :min, :sec]
props.each do
@key.to_s(props.last).should == "#{@scope}/#{@label}:#{@key.date.to_s(props.last)}"
props.pop
end
+ key = Redistat::Key.new(@scope, nil, @date, {:depth => :hour})
+ key.to_s.should == "#{@scope}:#{key.date.to_s(:hour)}"
end
it "should abide to hashed_label option" do
@key = Redistat::Key.new(@scope, @label, @date, {:depth => :hour, :hashed_label => true})
@key.to_s.should == "#{@scope}/#{@label_hash}:#{@key.date.to_s(:hour)}"
\ No newline at end of file