Skip to content

Commit

Permalink
specs: improve logging of idempotence test failure
Browse files Browse the repository at this point in the history
  • Loading branch information
Dominic Cleal committed Dec 8, 2012
1 parent 29d64da commit f3ac32f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions spec/lib/augeas_spec/fixtures.rb
Expand Up @@ -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
Expand Down

0 comments on commit f3ac32f

Please sign in to comment.