diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 4a5c46c3..33f27e2d 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,3 +1,6 @@ +# Load libraries here to simulate how they live together in a real puppet run (for provider unit tests) +$LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'inifile', 'lib')) +$LOAD_PATH.push(File.join(File.dirname(__FILE__), 'fixtures', 'modules', 'openstacklib', 'lib')) require 'puppetlabs_spec_helper/module_spec_helper' require 'shared_examples' require 'puppet-openstack_spec_helper/facts' diff --git a/spec/unit/provider/tempest_config/ini_setting_spec.rb b/spec/unit/provider/tempest_config/ini_setting_spec.rb index 1bb15548..427cbff6 100644 --- a/spec/unit/provider/tempest_config/ini_setting_spec.rb +++ b/spec/unit/provider/tempest_config/ini_setting_spec.rb @@ -1,26 +1,3 @@ -$LOAD_PATH.push( - File.join( - File.dirname(__FILE__), - '..', - '..', - '..', - 'fixtures', - 'modules', - 'inifile', - 'lib') -) -$LOAD_PATH.push( - File.join( - File.dirname(__FILE__), - '..', - '..', - '..', - 'fixtures', - 'modules', - 'openstacklib', - 'lib') -) - require 'spec_helper' provider_class = Puppet::Type.type(:tempest_config).provider(:ini_setting)