Please review pull request #665: Bug/2.7.x/spec tmpfile cleanup opened by (cprice-puppet)
Description:
Recent spec_helper changes accidentally removed the behavior of cleaning up temp files after each test. This adds it back in.
- Opened: Thu Apr 12 00:50:16 UTC 2012
- Based on: puppetlabs:2.7.x (847b8d1f9cfa9ed3a4d1a391fdbdd85b912255da)
- Requested merge: cprice-puppet:bug/2.7.x/spec-tmpfile-cleanup (2957ffefd603c8fee95e388a1bffae5fa54debd8)
Diff follows:
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 0dfe8a6..29b7c09 100755
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -63,7 +63,7 @@ module PuppetSpec
Signal.stubs(:trap)
- # TODO: in a saner world, we'd move this logging redirection into our TestHelper class.
+ # TODO: in a more sane world, we'd move this logging redirection into our TestHelper class.
# Without doing so, external projects will all have to roll their own solution for
# redirecting logging, and for validating expected log messages. However, because the
# current implementation of this involves creating an instance variable "@logs" on
@@ -84,6 +84,9 @@ module PuppetSpec
config.after :each do
Puppet::Test::TestHelper.after_each_test()
+ # TODO: would like to move this into puppetlabs_spec_helper, but there are namespace issues at the moment.
+ PuppetSpec::Files.cleanup
+
# TODO: this should be abstracted in the future--see comments above the '@logs' block in the
# "before" code above.
#
-- You received this message because you are subscribed to the Google Groups "Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to [email protected].
For more options, visit this group at http://groups.google.com/group/puppet-dev?hl=en.
