mirror of
https://github.com/jimeh/redistat.git
synced 2026-02-19 05:16:39 +00:00
22 lines
512 B
Ruby
22 lines
512 B
Ruby
require "spec_helper"
|
|
|
|
describe Redistat::Result do
|
|
|
|
it "should should initialize properly" do
|
|
options = {:from => "from", :till => "till"}
|
|
result = Redistat::Result.new(options)
|
|
result.from.should == "from"
|
|
result.till.should == "till"
|
|
end
|
|
|
|
it "should have set_or_incr method" do
|
|
result = Redistat::Result.new
|
|
result[:world].should be_nil
|
|
result.set_or_incr(:world, 3)
|
|
result[:world].should == 3
|
|
result.set_or_incr(:world, 8)
|
|
result[:world].should == 11
|
|
end
|
|
|
|
end
|