diff options
Diffstat (limited to 'spec/unit/util/rdoc_spec.rb')
-rwxr-xr-x | spec/unit/util/rdoc_spec.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/util/rdoc_spec.rb b/spec/unit/util/rdoc_spec.rb index 65df26156..58c2034ee 100755 --- a/spec/unit/util/rdoc_spec.rb +++ b/spec/unit/util/rdoc_spec.rb @@ -75,6 +75,19 @@ describe Puppet::Util::RDoc do Puppet::Util::RDoc.manifestdoc([]) end + it "should use a parser with the correct environment" do + FileTest.stubs(:file?).returns(true) + Puppet::Util::RDoc.stubs(:output) + + parser = stub_everything + Puppet::Parser::Parser.stubs(:new).with{ |env| env.is_a?(Puppet::Node::Environment) }.returns(parser) + + parser.expects(:file=).with("file") + parser.expects(:parse) + + Puppet::Util::RDoc.manifestdoc(["file"]) + end + it "should puppet parse all given files" do FileTest.stubs(:file?).returns(true) Puppet::Util::RDoc.stubs(:output) |