diff options
author | Luke Kanies <luke@madstop.com> | 2008-07-04 15:35:18 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-07-04 15:35:18 -0500 |
commit | 2863df288150da87a58ce4d938bbcf9a5d841f43 (patch) | |
tree | 571c8de49b1133655551f6a43dd7f4ec39d28e30 /test | |
parent | a37a7845073ef0b0923549364cbac5e0e39e3194 (diff) | |
download | puppet-2863df288150da87a58ce4d938bbcf9a5d841f43.tar.gz puppet-2863df288150da87a58ce4d938bbcf9a5d841f43.tar.xz puppet-2863df288150da87a58ce4d938bbcf9a5d841f43.zip |
Refactoring the Transaction::Event class.
The class had a 'transaction' accessor that was assigned
but never used, and it is simple enough that it needed
direct arguments rather than named arguments.
The rest of the code is changing the other classes that use
Events.
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/lib/puppettest/support/utils.rb | 2 | ||||
-rwxr-xr-x | test/other/transactions.rb | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb index cb4a6924c..654531cfc 100644 --- a/test/lib/puppettest/support/utils.rb +++ b/test/lib/puppettest/support/utils.rb @@ -88,7 +88,7 @@ module PuppetTest::Support::Utils newevents = nil assert_nothing_raised("Transaction %s %s failed" % [type, msg]) { newevents = trans.send(method).reject { |e| e.nil? }.collect { |e| - e.event + e.name } } diff --git a/test/other/transactions.rb b/test/other/transactions.rb index ff266b8d9..7f42bb6f4 100755 --- a/test/other/transactions.rb +++ b/test/other/transactions.rb @@ -815,7 +815,7 @@ class TestTransactions < Test::Unit::TestCase assert(changes.length > 0, "did not get any changes") changes.each do |change| - assert_equal(resource, change.source, "change did not get proxy set correctly") + assert_equal(resource, change.resource, "change did not get proxy set correctly") end end @@ -906,9 +906,8 @@ class TestTransactions < Test::Unit::TestCase assert_instance_of(Array, result) event = result.shift assert_instance_of(Puppet::Transaction::Event, event) - assert_equal(:triggered, event.event, "event was not set correctly") + assert_equal(:triggered, event.name, "event was not set correctly") assert_equal(c, event.source, "source was not set correctly") - assert_equal(trans, event.transaction, "transaction was not set correctly") assert(trans.triggered?(c, :refresh), "Transaction did not store the trigger") |