Signed-off-by: John A. Barbuto <[email protected]>
---
 lib/puppet/application/puppetdoc.rb |    1 +
 spec/unit/application/puppetdoc.rb  |    6 ++++++
 2 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/application/puppetdoc.rb 
b/lib/puppet/application/puppetdoc.rb
index 45aba42..a5496cc 100644
--- a/lib/puppet/application/puppetdoc.rb
+++ b/lib/puppet/application/puppetdoc.rb
@@ -79,6 +79,7 @@ Puppet::Application.new(:puppetdoc) do
             if @manifest
                 Puppet::Util::RDoc.manifestdoc(files)
             else
+                options[:outputdir] = "doc" unless options[:outputdir]
                 Puppet::Util::RDoc.rdoc(options[:outputdir], files)
             end
         rescue => detail
diff --git a/spec/unit/application/puppetdoc.rb 
b/spec/unit/application/puppetdoc.rb
index 2bb74a7..b917375 100755
--- a/spec/unit/application/puppetdoc.rb
+++ b/spec/unit/application/puppetdoc.rb
@@ -320,6 +320,12 @@ describe "puppetdoc" do
                 @puppetdoc.rdoc
             end
 
+            it "should call Puppet::Util::RDoc.rdoc in full mode with 
outputdir set to doc if no --outputdir" do
+                @puppetdoc.options.expects(:[]).with(:outputdir).returns(false)
+                Puppet::Util::RDoc.expects(:rdoc).with('doc', 
['modules','manifests'])
+                @puppetdoc.rdoc
+            end
+
             it "should call Puppet::Util::RDoc.manifestdoc in manifest mode" do
                 @puppetdoc.manifest = true
                 Puppet::Util::RDoc.expects(:manifestdoc)
-- 
1.5.5.6


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to