Permalink
Browse files

specs: improve logging of idempotence test failure

  • Loading branch information...
1 parent 29d64da commit f3ac32f05fde0bd175d57f307480e4112dccd789 Dominic Cleal committed Dec 8, 2012
Showing with 4 additions and 2 deletions.
  1. +4 −2 spec/lib/augeas_spec/fixtures.rb
@@ -35,8 +35,10 @@ def apply!(resource)
@logs.clear
txn_idempotent = apply(resource)
loglevels = Puppet::Util::Log.levels[2, 999]
- @logs.select { |log| loglevels.include? log.level }.should == []
- txn_idempotent.any_failed?.should_not be_true
+ againlogs = @logs.select { |log| loglevels.include? log.level }
+
+ againlogs.should eq([]), "expected no change on second run (idempotence check),\n got: #{againlogs.inspect}"
+ txn_idempotent.any_failed?.should_not be_true, "expected no change on second run (idempotence check), got a resource failure"
txn
end

0 comments on commit f3ac32f

Please sign in to comment.