summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@reductivelabs.com>2010-01-19 23:40:59 -0800
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commita18769da31e03e05277d6ad52ca1f38acee5ecbd (patch)
tree1ab1d15271e874c2b95a756079ecc176fbebe733
parent386b3e567f09c1ff1eb8ba4bb0a4f6432d3fab31 (diff)
downloadpuppet-a18769da31e03e05277d6ad52ca1f38acee5ecbd.tar.gz
puppet-a18769da31e03e05277d6ad52ca1f38acee5ecbd.tar.xz
puppet-a18769da31e03e05277d6ad52ca1f38acee5ecbd.zip
Cleaning up the report tests a bit
Signed-off-by: Luke Kanies <luke@reductivelabs.com>
-rwxr-xr-xspec/unit/transaction/report.rb39
1 files changed, 20 insertions, 19 deletions
diff --git a/spec/unit/transaction/report.rb b/spec/unit/transaction/report.rb
index 5be625e1d..8476444fd 100755
--- a/spec/unit/transaction/report.rb
+++ b/spec/unit/transaction/report.rb
@@ -79,27 +79,28 @@ describe Puppet::Transaction::Report do
Puppet::Util::Cacher.expire
end
end
-end
-describe Puppet::Transaction::Report, " when computing exit status" do
- it "should compute 2 if changes present" do
- report = Puppet::Transaction::Report.new
- report.newmetric("changes", {:total => 1})
- report.newmetric("resources", {:failed => 0})
- report.exit_status.should == 2
- end
+ describe "when computing exit status" do
+ it "should produce 2 if changes are present" do
+ report = Puppet::Transaction::Report.new
+ report.newmetric("changes", {:total => 1})
+ report.newmetric("resources", {:failed => 0})
+ report.exit_status.should == 2
+ end
- it "should compute 4 if failures present" do
- report = Puppet::Transaction::Report.new
- report.newmetric("changes", {:total => 0})
- report.newmetric("resources", {:failed => 1})
- report.exit_status.should == 4
- end
+ it "should produce 4 if failures are present" do
+ report = Puppet::Transaction::Report.new
+ report.newmetric("changes", {:total => 0})
+ report.newmetric("resources", {:failed => 1})
+ report.exit_status.should == 4
+ end
- it "should compute 6 if both changes and present" do
- report = Puppet::Transaction::Report.new
- report.newmetric("changes", {:total => 1})
- report.newmetric("resources", {:failed => 1})
- report.exit_status.should == 6
+ it "should produce 6 if both changes and failures are present" do
+ report = Puppet::Transaction::Report.new
+ report.newmetric("changes", {:total => 1})
+ report.newmetric("resources", {:failed => 1})
+ report.exit_status.should == 6
+ end
end
end
+