81193abd84be50b52ae26013a4cf0df5ae84c823
[packages/precise/mcollective.git] / spec / spec_helper.rb
1 dir = File.expand_path(File.dirname(__FILE__))
2 $LOAD_PATH.unshift("#{dir}/")
3 $LOAD_PATH.unshift("#{dir}/../lib")
4 $LOAD_PATH.unshift("#{dir}/../plugins")
5
6 require 'rubygems'
7
8 gem 'mocha'
9
10 require 'rspec'
11 require 'mcollective'
12 require 'rspec/mocks'
13 require 'mocha'
14 require 'ostruct'
15 require 'tmpdir'
16 require 'tempfile'
17 require 'fileutils'
18
19 require 'monkey_patches/instance_variable_defined'
20 require 'matchers/exception_matchers'
21
22 RSpec.configure do |config|
23   config.mock_with :mocha
24   config.include(MCollective::Matchers)
25
26   config.before :each do
27     MCollective::Config.instance.set_config_defaults("")
28     MCollective::PluginManager.clear
29     MCollective::Log.stubs(:log)
30     MCollective::Log.stubs(:logmsg)
31     MCollective::Log.stubs(:logexception)
32   end
33 end