summaryrefslogtreecommitdiffstats
path: root/test/lib
diff options
context:
space:
mode:
Diffstat (limited to 'test/lib')
-rw-r--r--test/lib/puppettest/support/assertions.rb7
-rw-r--r--test/lib/puppettest/support/utils.rb19
2 files changed, 6 insertions, 20 deletions
diff --git a/test/lib/puppettest/support/assertions.rb b/test/lib/puppettest/support/assertions.rb
index 31fa3f1da..758c126ce 100644
--- a/test/lib/puppettest/support/assertions.rb
+++ b/test/lib/puppettest/support/assertions.rb
@@ -46,7 +46,12 @@ module PuppetTest
config = resources2catalog(*resources)
transaction = Puppet::Transaction.new(config)
- run_events(:evaluate, transaction, events, msg)
+ transaction.evaluate
+ newevents = transaction.events.
+ reject { |e| ['failure', 'audit'].include? e.status }.
+ collect { |e| e.name }
+
+ assert_equal(events, newevents, "Incorrect evaluate #{msg} events")
transaction
end
diff --git a/test/lib/puppettest/support/utils.rb b/test/lib/puppettest/support/utils.rb
index bca5d9634..4ecc3819e 100644
--- a/test/lib/puppettest/support/utils.rb
+++ b/test/lib/puppettest/support/utils.rb
@@ -82,25 +82,6 @@ module PuppetTest::Support::Utils
@mygroup = group
end
- def run_events(type, trans, events, msg)
- case type
- when :evaluate, :rollback # things are hunky-dory
- else
- raise Puppet::DevError, "Incorrect run_events type"
- end
-
- method = type
-
- trans.send(method)
- newevents = trans.events.reject { |e| ['failure', 'audit'].include? e.status }.collect { |e|
- e.name
- }
-
- assert_equal(events, newevents, "Incorrect #{type} #{msg} events")
-
- trans
- end
-
def fakefile(name)
ary = [basedir, "test"]
ary += name.split("/")