summaryrefslogtreecommitdiff
path: root/spec/integration/util/autoload_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/integration/util/autoload_spec.rb')
-rwxr-xr-xspec/integration/util/autoload_spec.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/integration/util/autoload_spec.rb b/spec/integration/util/autoload_spec.rb
index bfe8b67d2..c352fea9e 100755
--- a/spec/integration/util/autoload_spec.rb
+++ b/spec/integration/util/autoload_spec.rb
@@ -95,12 +95,12 @@ describe Puppet::Util::Autoload do
file = File.join(libdir, "plugin.rb")
- Puppet[:modulepath] = modulepath
-
- with_loader("foo", "foo") do |dir, loader|
- with_file(:plugin, file.split("/")) do
- loader.load(:plugin)
- loader.class.should be_loaded("foo/plugin.rb")
+ Puppet.override(:environments => Puppet::Environments::Static.new(Puppet::Node::Environment.create(:production, [modulepath]))) do
+ with_loader("foo", "foo") do |dir, loader|
+ with_file(:plugin, file.split("/")) do
+ loader.load(:plugin)
+ loader.class.should be_loaded("foo/plugin.rb")
+ end
end
end
end