diff options
author | Jesse Wolfe <jes5199@gmail.com> | 2011-03-24 17:51:59 -0700 |
---|---|---|
committer | Jesse Wolfe <jes5199@gmail.com> | 2011-03-25 15:43:58 -0700 |
commit | 7c60db5d9db8eeda46f7041100759e69aed120a8 (patch) | |
tree | b1236106ed4fcd746c5ec8dee2f5028152eea93d /spec/unit/util/rdoc/parser_spec.rb | |
parent | 0f3e537a127ff0a55e25e0eea4b7513529867df3 (diff) | |
download | puppet-7c60db5d9db8eeda46f7041100759e69aed120a8.tar.gz puppet-7c60db5d9db8eeda46f7041100759e69aed120a8.tar.xz puppet-7c60db5d9db8eeda46f7041100759e69aed120a8.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.
Backported this change to 2.6.x
Paired-With: Jacob Helwig <jacob@puppetlabs.com>
Diffstat (limited to 'spec/unit/util/rdoc/parser_spec.rb')
-rwxr-xr-x | spec/unit/util/rdoc/parser_spec.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/util/rdoc/parser_spec.rb b/spec/unit/util/rdoc/parser_spec.rb index b4453ae86..6ae28b40a 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) + parser.expects(:parse).at_least_once parser.expects(:file=).with("module/manifests/init.pp") + parser.expects(:file=).with("/dev/null/manifests/site.pp") @parser.scan end |