diff options
| author | Luke Kanies <luke@madstop.com> | 2009-08-18 15:58:38 -0700 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2009-08-18 15:58:38 -0700 |
| commit | 796ba5c4ccec117bbc4dec69c670337e70b48634 (patch) | |
| tree | 549f59c2202da84a3c0d527f4df964bc61c1b6b4 /spec/unit/file_serving/mount.rb | |
| parent | 6bd3627d606cde4bea9293b855be0dd2b1170a92 (diff) | |
| download | puppet-796ba5c4ccec117bbc4dec69c670337e70b48634.tar.gz puppet-796ba5c4ccec117bbc4dec69c670337e70b48634.tar.xz puppet-796ba5c4ccec117bbc4dec69c670337e70b48634.zip | |
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 <luke@madstop.com>
Diffstat (limited to 'spec/unit/file_serving/mount.rb')
| -rwxr-xr-x | spec/unit/file_serving/mount.rb | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/spec/unit/file_serving/mount.rb b/spec/unit/file_serving/mount.rb index e9e1f0860..cbb97b0d9 100755 --- a/spec/unit/file_serving/mount.rb +++ b/spec/unit/file_serving/mount.rb @@ -4,26 +4,8 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/file_serving/mount' describe Puppet::FileServing::Mount do - before do - @mount = Puppet::FileServing::Mount.new("foo") - end - - it "should be able to look up a node's environment" do - Puppet::Node.expects(:find).with("mynode").returns mock('node', :environment => "myenv") - Puppet::Node::Environment.expects(:new).with("myenv").returns "eh" - - @mount.environment("mynode").should == "eh" - end - - it "should use the default environment if no node information is provided" do - Puppet::Node.expects(:find).with("mynode").returns nil - Puppet::Node::Environment.expects(:new).with(nil).returns "eh" - - @mount.environment("mynode").should == "eh" - end - it "should use 'mount[$name]' as its string form" do - @mount.to_s.should == "mount[foo]" + Puppet::FileServing::Mount.new("foo").to_s.should == "mount[foo]" end end |
