added a spec for Collection#total

This commit is contained in:
2010-11-28 11:52:05 +00:00
parent cbb9050c80
commit f906cf068e
2 changed files with 11 additions and 0 deletions

View File

@@ -12,5 +12,9 @@ module Redistat
@depth = options[:depth] ||= nil
end
def total
@total ||= {}
end
end
end

View File

@@ -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