From 796ba5c4ccec117bbc4dec69c670337e70b48634 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Tue, 18 Aug 2009 15:58:38 -0700 Subject: Fixing #1544 - plugins in modules now works again We had to fix the fileserving plumbing to use the request environment instead of trying to use the node environment. This was apparently never fixed after we added the environment to the URI in REST calls. There's still a bit of refactoring left to clean up the APIs used in some of this code. Signed-off-by: Luke Kanies --- spec/unit/node/environment.rb | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'spec/unit/node') diff --git a/spec/unit/node/environment.rb b/spec/unit/node/environment.rb index f8b2dea7f..18747d1b7 100755 --- a/spec/unit/node/environment.rb +++ b/spec/unit/node/environment.rb @@ -105,9 +105,10 @@ describe Puppet::Node::Environment do module_path = %w{/one /two}.join(File::PATH_SEPARATOR) env.expects(:modulepath).returns module_path - Puppet::Module.expects(:each_module).with(module_path).multiple_yields("mod1", "mod2") + mods = [Puppet::Module.new('mod1'), Puppet::Module.new("mod2")] + Puppet::Module.expects(:each_module).with(module_path).multiple_yields(*mods) - env.modules.should == %w{mod1 mod2} + env.modules.should == mods end it "should be able to return an individual module that exists in its module path" do -- cgit