4c92d91feff908236a181e17f11bdd44323d0e1b
[packages/precise/mcollective.git] / spec / unit / aggregate / result / numeric_result_spec.rb
1 #!/usr/bin/env rspec
2
3 require 'spec_helper'
4
5 module MCollective
6   class Aggregate
7     module Result
8       describe NumericResult do
9         describe "#to_s" do
10           it "should return empty string when no results were computed" do
11             NumericResult.new({}, "test %d", :action).to_s.should == ""
12           end
13
14           it "should return the correctly formatted string" do
15             num = NumericResult.new({:value => 1}, "test %d", :action).to_s
16             num.should == "test 1"
17           end
18         end
19       end
20     end
21   end
22 end