Updated mcollective.init according to OSCI-658
[packages/precise/mcollective.git] / spec / unit / aggregate / result / collection_result_spec.rb
diff --git a/spec/unit/aggregate/result/collection_result_spec.rb b/spec/unit/aggregate/result/collection_result_spec.rb
new file mode 100644 (file)
index 0000000..c13d540
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env rspec
+
+require 'spec_helper'
+
+module MCollective
+  class Aggregate
+    module Result
+      describe CollectionResult do
+        describe "#to_s" do
+         it "should return the correctly formatted string" do
+           result = CollectionResult.new({:output => [:test], :value => {"foo" => 3, "bar" => 2}}, "%s:%s", :action).to_s
+           result.should == "foo:3\nbar:2"
+         end
+        end
+      end
+    end
+  end
+end