X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fspec_helper.rb;fp=spec%2Fspec_helper.rb;h=81193abd84be50b52ae26013a4cf0df5ae84c823;hb=b87d2f4e68281062df1913440ca5753ae63314a9;hp=0000000000000000000000000000000000000000;hpb=ab0ea530b8ac956091f17b104ab2311336cfc250;p=packages%2Fprecise%2Fmcollective.git diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb new file mode 100644 index 0000000..81193ab --- /dev/null +++ b/spec/spec_helper.rb @@ -0,0 +1,33 @@ +dir = File.expand_path(File.dirname(__FILE__)) +$LOAD_PATH.unshift("#{dir}/") +$LOAD_PATH.unshift("#{dir}/../lib") +$LOAD_PATH.unshift("#{dir}/../plugins") + +require 'rubygems' + +gem 'mocha' + +require 'rspec' +require 'mcollective' +require 'rspec/mocks' +require 'mocha' +require 'ostruct' +require 'tmpdir' +require 'tempfile' +require 'fileutils' + +require 'monkey_patches/instance_variable_defined' +require 'matchers/exception_matchers' + +RSpec.configure do |config| + config.mock_with :mocha + config.include(MCollective::Matchers) + + config.before :each do + MCollective::Config.instance.set_config_defaults("") + MCollective::PluginManager.clear + MCollective::Log.stubs(:log) + MCollective::Log.stubs(:logmsg) + MCollective::Log.stubs(:logexception) + end +end