spec/unit/rpc/result_spec.rb in mcollective-client-2.0.0 vs spec/unit/rpc/result_spec.rb in mcollective-client-2.2.0

- old
+ new

@@ -42,9 +42,16 @@ @result[:bar].should == "baz" @result[:meh].should == "blah" end end + describe "#fetch" do + it "should fetch data with the correct default behavior" do + @result.fetch(:foo, "default").should == "bar" + @result.fetch(:rspec, "default").should == "default" + end + end + describe "#each" do it "should itterate all the pairs" do data = {} @result.each {|k,v| data[k] = v}