diff options
author | Luke Kanies <luke@madstop.com> | 2009-09-04 16:22:42 -0700 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2009-09-05 09:33:14 +1000 |
commit | 994d6e08e8cb43b871fbac0b255718a7050a67b3 (patch) | |
tree | 588f5b57c4e319aa210e55d2639a24560c5484f9 /spec | |
parent | 42ab73f29ada8e045e6638ccb454b12595220fe1 (diff) | |
download | puppet-994d6e08e8cb43b871fbac0b255718a7050a67b3.tar.gz puppet-994d6e08e8cb43b871fbac0b255718a7050a67b3.tar.xz puppet-994d6e08e8cb43b871fbac0b255718a7050a67b3.zip |
Adding tests for the #2599 fix
Signed-off-by: Luke Kanies <luke@madstop.com>
Diffstat (limited to 'spec')
-rw-r--r-- | spec/unit/parser/files.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/spec/unit/parser/files.rb b/spec/unit/parser/files.rb index 7aa1a34f5..4d25f7c72 100644 --- a/spec/unit/parser/files.rb +++ b/spec/unit/parser/files.rb @@ -118,6 +118,17 @@ describe Puppet::Parser::Files do after { Puppet.settings.clear } end + describe "when searching for manifests" do + it "should ignore invalid modules" do + mod = mock 'module' + Puppet::Node::Environment.new.expects(:module).with("mymod").raises Puppet::Module::InvalidName + Puppet.expects(:value).with(:modulepath).never + Dir.stubs(:glob).returns %w{foo} + + Puppet::Parser::Files.find_manifests("mymod/init.pp").should == %w{foo} + end + end + describe "when searching for manifests when no module is found" do before do File.stubs(:find).returns(nil) |