diff options
author | Luke Kanies <luke@madstop.com> | 2008-04-10 15:48:45 -0500 |
---|---|---|
committer | Luke Kanies <luke@madstop.com> | 2008-04-10 15:48:45 -0500 |
commit | d91b6d8ac081179c467c7c4e9ea7ac067aa22baf (patch) | |
tree | 6f0032c01553618a3ec7d3deb4183c32e51ac939 /spec | |
parent | 738889ba027b894867209d5175c716f9a2cc54c6 (diff) | |
download | puppet-d91b6d8ac081179c467c7c4e9ea7ac067aa22baf.tar.gz puppet-d91b6d8ac081179c467c7c4e9ea7ac067aa22baf.tar.xz puppet-d91b6d8ac081179c467c7c4e9ea7ac067aa22baf.zip |
Fixing #1173 -- classes and definitions can now have the same
name as a directory with no failures.
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/module.rb (renamed from spec/unit/other/modules.rb) | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/spec/unit/other/modules.rb b/spec/unit/module.rb index 26ca3907d..4115ee776 100755 --- a/spec/unit/other/modules.rb +++ b/spec/unit/module.rb @@ -171,6 +171,15 @@ describe Puppet::Module, " when searching for manifests in a found module" do Puppet::Module.find_manifests("mymod/yay/*.pp").should == %w{/one /two} end + it "should not return directories" do + Puppet.settings.expects(:value).with(:modulepath, nil).returns("/my/modules") + File.stubs(:directory?).returns(true) + Dir.expects(:glob).with("/my/modules/mymod/manifests/yay/*.pp").returns(%w{/one /two}) + FileTest.expects(:directory?).with("/one").returns false + FileTest.expects(:directory?).with("/two").returns true + Puppet::Module.find_manifests("mymod/yay/*.pp").should == %w{/one} + end + it "should default to the 'init.pp' file in the manifests directory" do Puppet.settings.expects(:value).with(:modulepath, nil).returns("/my/modules") File.stubs(:directory?).returns(true) |