diff options
| author | Jesse Wolfe <jes5199@gmail.com> | 2010-04-26 14:30:12 -0700 |
|---|---|---|
| committer | test branch <puppet-dev@googlegroups.com> | 2010-02-17 06:50:53 -0800 |
| commit | 5b64d3b798b79357f98f100fc027d73518320ddf (patch) | |
| tree | 5c241e0300f89a6d06d671255b2e713122a293e6 /spec/unit/application/master.rb | |
| parent | 5683fd983b9a165ffbb8f08e67cfe903ec0e41b7 (diff) | |
| download | puppet-5b64d3b798b79357f98f100fc027d73518320ddf.tar.gz puppet-5b64d3b798b79357f98f100fc027d73518320ddf.tar.xz puppet-5b64d3b798b79357f98f100fc027d73518320ddf.zip | |
feature #2276 Single Executable: optparser should get CommandLine#args instead of ARGV
Signed-off-by: Jesse Wolfe <jes5199@gmail.com>
Diffstat (limited to 'spec/unit/application/master.rb')
| -rw-r--r-- | spec/unit/application/master.rb | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/spec/unit/application/master.rb b/spec/unit/application/master.rb index 2672fdb16..362769e53 100644 --- a/spec/unit/application/master.rb +++ b/spec/unit/application/master.rb @@ -80,13 +80,7 @@ describe Puppet::Application::Master do describe "when applying options" do before do - @old_argv = ARGV.dup - ARGV.clear - end - - after do - ARGV.clear - @old_argv.each { |a| ARGV << a } + @master.command_line.stubs(:args).returns([]) end it "should set the log destination with --logdest" do @@ -102,7 +96,7 @@ describe Puppet::Application::Master do end it "should parse the log destination from ARGV" do - ARGV << "--logdest" << "/my/file" + @master.command_line.stubs(:args).returns(%w[--logdest /my/file]) Puppet::Util::Log.expects(:newdestination).with("/my/file") |
