diff options
author | Brice Figureau <brice-puppet@daysofwonder.com> | 2010-10-16 19:10:43 +0200 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2010-11-10 06:19:46 +1100 |
commit | 06c8748cbfed67b2440e11577a52f60c43277217 (patch) | |
tree | 811b0115c829dc2b2e61f977092c31dde60d854f /spec | |
parent | 6e6712b543949bc5bb98e63cfdf4112c79adc28c (diff) | |
download | puppet-06c8748cbfed67b2440e11577a52f60c43277217.tar.gz puppet-06c8748cbfed67b2440e11577a52f60c43277217.tar.xz puppet-06c8748cbfed67b2440e11577a52f60c43277217.zip |
Fix #3808 - puppetdoc should use --force-update only if RDoc supports it
This should allow to run puppetdoc on ruby 1.8.5.
Signed-off-by: Brice Figureau <brice-puppet@daysofwonder.com>
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/unit/util/rdoc_spec.rb | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/spec/unit/util/rdoc_spec.rb b/spec/unit/util/rdoc_spec.rb index 58c2034ee..41d4b9cd0 100755 --- a/spec/unit/util/rdoc_spec.rb +++ b/spec/unit/util/rdoc_spec.rb @@ -43,12 +43,20 @@ describe Puppet::Util::RDoc do Puppet::Util::RDoc.rdoc("output", [], "utf-8") end - it "should tell RDoc to force updates of indices" do + it "should tell RDoc to force updates of indices when RDoc supports it" do + Options::OptionList.stubs(:options).returns([["--force-update", "-U", 0 ]]) @rdoc.expects(:document).with { |args| args.include?("--force-update") } Puppet::Util::RDoc.rdoc("output", []) end + it "should not tell RDoc to force updates of indices when RDoc doesn't support it" do + Options::OptionList.stubs(:options).returns([]) + @rdoc.expects(:document).never.with { |args| args.include?("--force-update") } + + Puppet::Util::RDoc.rdoc("output", []) + end + it "should tell RDoc to use the given outputdir" do @rdoc.expects(:document).with { |args| args.include?("--op") and args.include?("myoutputdir") } |