mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 05:16:39 +00:00
added a spec for Collection#total
This commit is contained in:
@@ -12,5 +12,9 @@ module Redistat
|
||||
@depth = options[:depth] ||= nil
|
||||
end
|
||||
|
||||
def total
|
||||
@total ||= {}
|
||||
end
|
||||
|
||||
end
|
||||
end
|
||||
@@ -10,4 +10,11 @@ describe Redistat::Collection do
|
||||
result.depth.should == options[:depth]
|
||||
end
|
||||
|
||||
it "should have a total property" do
|
||||
col = Redistat::Collection.new()
|
||||
col.total.should == {}
|
||||
col.total = {:foo => "bar"}
|
||||
col.total.should == {:foo => "bar"}
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user