diff options
author | kwadronaut <kwadronaut@leap.se> | 2016-07-25 00:44:22 +0200 |
---|---|---|
committer | kwadronaut <kwadronaut@leap.se> | 2016-07-25 00:44:22 +0200 |
commit | 30bc1e889dd0042132c4da21b94780c5a530b67c (patch) | |
tree | e430d45f553364c232626961df1647052166169d /spec/spec_helper.rb | |
parent | c0d2832dff7fb14e056a49b28860087b2f201619 (diff) | |
parent | 8c1aac4f23d245cda54994737c72a868d112db87 (diff) |
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) |