From 2cbd9e85259ed1742f8a54a7e5b9825d0bb79d5e Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 29 Oct 2009 00:23:05 -0700 Subject: Switching transactions to callback-based events Events are now queued as they are created, and the queues are managed through simple interfaces, rather than collecting events over time and responding to them inline. This drastically simplifies event management, and will make moving it to a separate system essentially trivial. Signed-off-by: Luke Kanies --- test/lib/puppettest/support/utils.rb | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'test/lib') diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb index 5dd531200..405a0c54b 100644 --- a/test/lib/puppettest/support/utils.rb +++ b/test/lib/puppettest/support/utils.rb @@ -79,11 +79,9 @@ module PuppetTest::Support::Utils method = type - newevents = nil - assert_nothing_raised("Transaction %s %s failed" % [type, msg]) { - newevents = trans.send(method).reject { |e| e.nil? }.collect { |e| - e.name - } + trans.send(method) + newevents = trans.events.reject { |e| e.nil? }.collect { |e| + e.name } assert_equal(events, newevents, "Incorrect %s %s events" % [type, msg]) -- cgit