summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--spec/spec_helper.rb36
1 files changed, 19 insertions, 17 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb
index 4073cb60b..3b04636f3 100644
--- a/spec/spec_helper.rb
+++ b/spec/spec_helper.rb
@@ -12,31 +12,33 @@ Pathname.glob("#{dir}/shared_behaviours/**/*.rb") do |behaviour|
end
RSpec.configure do |config|
- config.mock_with :mocha
+ config.mock_with :mocha
- config.before :each do
- # Set the confdir and vardir to gibberish so that tests
- # have to be correctly mocked.
- Puppet[:confdir] = "/dev/null"
- Puppet[:vardir] = "/dev/null"
+ config.before :each do
+ # 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"
+ # Avoid opening ports to the outside world
+ Puppet.settings[:bindaddress] = "127.0.0.1"
- @logs = []
- Puppet::Util::Log.newdestination(@logs)
- end
+ @logs = []
+ Puppet::Util::Log.newdestination(@logs)
- config.after :each do
- Puppet.settings.clear
+
+ end
- @logs.clear
- Puppet::Util::Log.close_all
- end
+ config.after :each do
+ Puppet.settings.clear
+
+ @logs.clear
+ Puppet::Util::Log.close_all
+ end
end
# We need this because the RAL uses 'should' as a method. This
# allows us the same behaviour but with a different method name.
class Object
- alias :must :should
+ alias :must :should
end