diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 036c7e4..33f27e2 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,5 @@ -# Load libraries from openstacklib here to simulate how they live together in a real puppet run (for provider unit tests) +# 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' diff --git a/spec/unit/provider/cloudkitty_api_paste_ini/ini_setting_spec.rb b/spec/unit/provider/cloudkitty_api_paste_ini/ini_setting_spec.rb index 380a2c2..084b1ec 100644 --- a/spec/unit/provider/cloudkitty_api_paste_ini/ini_setting_spec.rb +++ b/spec/unit/provider/cloudkitty_api_paste_ini/ini_setting_spec.rb @@ -1,19 +1,3 @@ -# -# these tests are a little concerning b/c they are hacking around the -# modulepath, so these tests will not catch issues that may eventually arise -# related to loading these plugins. -# I could not, for the life of me, figure out how to programatcally set the modulepath -$LOAD_PATH.push( - File.join( - File.dirname(__FILE__), - '..', - '..', - '..', - 'fixtures', - 'modules', - 'inifile', - 'lib') -) require 'spec_helper' provider_class = Puppet::Type.type(:cloudkitty_api_paste_ini).provider(:ini_setting) describe provider_class do diff --git a/spec/unit/provider/cloudkitty_api_uwsgi_config/ini_setting_spec.rb b/spec/unit/provider/cloudkitty_api_uwsgi_config/ini_setting_spec.rb index 54ace89..bbe9459 100644 --- a/spec/unit/provider/cloudkitty_api_uwsgi_config/ini_setting_spec.rb +++ b/spec/unit/provider/cloudkitty_api_uwsgi_config/ini_setting_spec.rb @@ -1,19 +1,3 @@ -# -# these tests are a little concerning b/c they are hacking around the -# modulepath, so these tests will not catch issues that may eventually arise -# related to loading these plugins. -# I could not, for the life of me, figure out how to programatcally set the modulepath -$LOAD_PATH.push( - File.join( - File.dirname(__FILE__), - '..', - '..', - '..', - 'fixtures', - 'modules', - 'inifile', - 'lib') -) require 'spec_helper' provider_class = Puppet::Type.type(:cloudkitty_api_uwsgi_config).provider(:ini_setting) describe provider_class do diff --git a/spec/unit/provider/cloudkitty_config/ini_setting_spec.rb b/spec/unit/provider/cloudkitty_config/ini_setting_spec.rb index 40cb0dc..ce9c5d8 100644 --- a/spec/unit/provider/cloudkitty_config/ini_setting_spec.rb +++ b/spec/unit/provider/cloudkitty_config/ini_setting_spec.rb @@ -1,30 +1,3 @@ -# -# these tests are a little concerning b/c they are hacking around the -# modulepath, so these tests will not catch issues that may eventually arise -# related to loading these plugins. -# I could not, for the life of me, figure out how to programatcally set the modulepath -$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(:cloudkitty_config).provider(:ini_setting) describe provider_class do