diff options
author | Luke Kanies <luke@madstop.com> | 2009-05-14 11:36:20 -0500 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-05-15 10:01:26 +1000 |
commit | fb957ccb6636ce86bd98c141d5818c54bc0d4659 (patch) | |
tree | 4ee5fd0ddc1e09dbb72bc06e6fcfd0caeee04f38 /spec/unit/parser/files.rb | |
parent | c6084093e67b1e415e49c192b3ac6f6b9aebc4ba (diff) | |
download | puppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.tar.gz puppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.tar.xz puppet-fb957ccb6636ce86bd98c141d5818c54bc0d4659.zip |
Modules now can find their own paths
Previously, when you created a module you had to specify
the path. Now Module instances can use the module path
to look up their paths, and there are methods for determining
whether the module is present (if the path is present).
Also cleaned up the methods for figuring out what's in
the module (plugins, etc.).
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec/unit/parser/files.rb')
-rw-r--r-- | spec/unit/parser/files.rb | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/spec/unit/parser/files.rb b/spec/unit/parser/files.rb index f401a902c..a7bd37b44 100644 --- a/spec/unit/parser/files.rb +++ b/spec/unit/parser/files.rb @@ -149,10 +149,6 @@ describe Puppet::Parser::Files do end describe "when searching for manifests in a found module" do - before do - @module = Puppet::Module.new("mymod", "/one") - end - it "should return the manifests from the first found module" do mod = mock 'module' Puppet::Node::Environment.new.expects(:module).with("mymod").returns mod @@ -167,28 +163,6 @@ describe Puppet::Parser::Files do Puppet::Parser::Files.find_manifests("mymod/init.pp", :environment => "myenv").should == ["/one/mymod/manifests/init.pp"] end - it "should return all manifests matching the glob pattern" do - File.stubs(:directory?).returns(true) - Dir.expects(:glob).with("/one/manifests/yay/*.pp").returns(%w{/one /two}) - - @module.match_manifests("yay/*.pp").should == %w{/one /two} - end - - it "should not return directories" do - Dir.expects(:glob).with("/one/manifests/yay/*.pp").returns(%w{/one /two}) - - FileTest.expects(:directory?).with("/one").returns false - FileTest.expects(:directory?).with("/two").returns true - - @module.match_manifests("yay/*.pp").should == %w{/one} - end - - it "should default to the 'init.pp' file in the manifests directory" do - Dir.expects(:glob).with("/one/manifests/init.pp").returns(%w{/init.pp}) - - @module.match_manifests(nil).should == %w{/init.pp} - end - after { Puppet.settings.clear } end end |