diff options
Diffstat (limited to 'spec/unit/application/puppetmasterd.rb')
-rw-r--r-- | spec/unit/application/puppetmasterd.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/unit/application/puppetmasterd.rb b/spec/unit/application/puppetmasterd.rb index 59377abb0..000b2d602 100644 --- a/spec/unit/application/puppetmasterd.rb +++ b/spec/unit/application/puppetmasterd.rb @@ -75,6 +75,16 @@ describe "PuppetMaster" do end describe "when applying options" do + before do + @old_argv = ARGV.dup + ARGV.clear + end + + after do + ARGV.clear + @old_argv.each { |a| ARGV << a } + end + it "should set the log destination with --logdest" do Puppet::Log.expects(:newdestination).with("console") @@ -86,6 +96,14 @@ describe "PuppetMaster" do @puppetmasterd.handle_logdest("console") end + + it "should parse the log destination from ARGV" do + ARGV << "--logdest" << "/my/file" + + Puppet::Util::Log.expects(:newdestination).with("/my/file") + + @puppetmasterd.parse_options + end end describe "during setup" do |