summaryrefslogtreecommitdiffstats
path: root/spec/unit/util/rdoc/parser_spec.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2011-03-24 17:51:59 -0700
committerJesse Wolfe <jes5199@gmail.com>2011-03-25 15:20:39 -0700
commitdaaa048a8d8829ad509b4a456826cc8a33cf6444 (patch)
tree817971bd3c1a7e8383bc3243833b8d1367e768dc /spec/unit/util/rdoc/parser_spec.rb
parentc7f6e5ee743c061c020521651360bba240ae4519 (diff)
downloadpuppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.tar.gz
puppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.tar.xz
puppet-daaa048a8d8829ad509b4a456826cc8a33cf6444.zip
(#5477) Allow watch_file to watch non-existent files, especially site.pp
The watch_file mechanism would refuse to monitor paths to files that didn't exist. This patch makes it possible to watch a file that hasn't been created yet, so when it is created, you manifests will get reparsed. Paired-With: Max Martin <max@puppetlabs.com> Reviewed-By: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'spec/unit/util/rdoc/parser_spec.rb')
-rwxr-xr-xspec/unit/util/rdoc/parser_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/util/rdoc/parser_spec.rb b/spec/unit/util/rdoc/parser_spec.rb
index ab54c8cd3..f118dc99b 100755
--- a/spec/unit/util/rdoc/parser_spec.rb
+++ b/spec/unit/util/rdoc/parser_spec.rb
@@ -20,8 +20,9 @@ describe RDoc::Parser do
@parser.stubs(:scan_top_level)
parser = stub 'parser'
Puppet::Parser::Parser.stubs(:new).returns(parser)
- parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new(''))
+ parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new('')).at_least_once
parser.expects(:file=).with("module/manifests/init.pp")
+ parser.expects(:file=).with("/dev/null/manifests/site.pp")
@parser.scan
end
@@ -29,7 +30,7 @@ describe RDoc::Parser do
it "should scan the ast for Puppet files" do
parser = stub_everything 'parser'
Puppet::Parser::Parser.stubs(:new).returns(parser)
- parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new(''))
+ parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new('')).at_least_once
@parser.expects(:scan_top_level)
@@ -39,7 +40,7 @@ describe RDoc::Parser do
it "should return a PuppetTopLevel to RDoc" do
parser = stub_everything 'parser'
Puppet::Parser::Parser.stubs(:new).returns(parser)
- parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new(''))
+ parser.expects(:parse).returns(Puppet::Parser::AST::Hostclass.new('')).at_least_once
@parser.expects(:scan_top_level)