diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 34 |
1 files changed, 9 insertions, 25 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 461a858..381f972 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,29 +1,13 @@ -$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib')) -$LOAD_PATH.unshift(File.dirname(__FILE__)) -require 'rspec' -require 'mocha' -require 'trocla' +require 'puppetlabs_spec_helper/module_spec_helper' +require 'rake' -# Requires supporting files with custom matchers and macros, etc, -# in ./support/ and its subdirectories. -Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f} +fixture_path = File.expand_path(File.join(__FILE__, '..', 'fixtures')) -RSpec.configure do |config| - +RSpec.configure do |c| + c.module_path = File.join(fixture_path, 'modules') + c.manifest_dir = File.join(fixture_path, 'manifests') + c.pattern = FileList[c.pattern].exclude(/^spec\/fixtures/) end -def default_config - @default_config ||= YAML.load(File.read(File.expand_path(base_dir+'/lib/trocla/default_config.yaml'))) -end - -def test_config - return @config unless @config.nil? - @config = default_config - @config.delete('adapter_options') - @config['adapter'] = :Memory - @config -end - -def base_dir - File.dirname(__FILE__)+'/../' -end +Puppet::Util::Log.level = :warning +Puppet::Util::Log.newdestination(:console) |