summaryrefslogtreecommitdiffstats
path: root/spec/unit/application/doc.rb
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-04-30 15:47:15 -0700
committertest branch <puppet-dev@googlegroups.com>2010-02-17 06:50:53 -0800
commit5683fd983b9a165ffbb8f08e67cfe903ec0e41b7 (patch)
treeb1a908be53502201b5ee0f1b37aae8e57a14bf37 /spec/unit/application/doc.rb
parentd038a1d3ddffdf1366c78fe31118e9f15c1c6ed1 (diff)
downloadpuppet-5683fd983b9a165ffbb8f08e67cfe903ec0e41b7.tar.gz
puppet-5683fd983b9a165ffbb8f08e67cfe903ec0e41b7.tar.xz
puppet-5683fd983b9a165ffbb8f08e67cfe903ec0e41b7.zip
Feature #2276 Single Executable: Pass a commandline object to the application
Refactor so that the command line options only get parsed once Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec/unit/application/doc.rb')
-rwxr-xr-xspec/unit/application/doc.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/application/doc.rb b/spec/unit/application/doc.rb
index 3bda25f2f..c1184925e 100755
--- a/spec/unit/application/doc.rb
+++ b/spec/unit/application/doc.rb
@@ -128,11 +128,11 @@ describe Puppet::Application::Doc do
before :each do
Puppet::Log.stubs(:newdestination)
- Puppet::Util::CommandLine.stubs(:args).returns([])
+ @doc.command_line.stubs(:args).returns([])
end
it "should default to rdoc mode if there are command line arguments" do
- Puppet::Util::CommandLine.stubs(:args).returns(["1"])
+ @doc.command_line.stubs(:args).returns(["1"])
@doc.stubs(:setup_rdoc)
@doc.options.expects(:[]=).with(:mode,:rdoc)
@@ -304,7 +304,7 @@ describe Puppet::Application::Doc do
@doc.stubs(:exit)
File.stubs(:expand_path).with('modules').returns('modules')
File.stubs(:expand_path).with('manifests').returns('manifests')
- Puppet::Util::CommandLine.stubs(:args).returns([])
+ @doc.command_line.stubs(:args).returns([])
end
it "should set document_all on --all" do