From: Daniel Pittman <[email protected]> Specifically, reverse the order of the two in spec_helper so that they make more sense; the inverted order was confusing. There are no functional changes, only code movement, in this patchset.
Reviewed-By: Nick Lewis <[email protected]> --- spec/spec_helper.rb | 34 +++++++++++++++++----------------- 1 files changed, 17 insertions(+), 17 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 84ef3f2..feb8928 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -30,6 +30,23 @@ require 'monkey_patches/publicize_methods' RSpec.configure do |config| config.mock_with :mocha + config.before :each do + # these globals are set by Application + $puppet_application_mode = nil + $puppet_application_name = nil + + # Set the confdir and vardir to gibberish so that tests + # have to be correctly mocked. + Puppet[:confdir] = "/dev/null" + Puppet[:vardir] = "/dev/null" + + # Avoid opening ports to the outside world + Puppet.settings[:bindaddress] = "127.0.0.1" + + @logs = [] + Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs)) + end + config.after :each do Puppet.settings.clear Puppet::Node::Environment.clear @@ -59,23 +76,6 @@ RSpec.configure do |config| @logs.clear Puppet::Util::Log.close_all end - - config.before :each do - # these globals are set by Application - $puppet_application_mode = nil - $puppet_application_name = nil - - # Set the confdir and vardir to gibberish so that tests - # have to be correctly mocked. - Puppet[:confdir] = "/dev/null" - Puppet[:vardir] = "/dev/null" - - # Avoid opening ports to the outside world - Puppet.settings[:bindaddress] = "127.0.0.1" - - @logs = [] - Puppet::Util::Log.newdestination(Puppet::Test::LogCollector.new(@logs)) - end end end -- 1.7.4.1 -- 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.
