diff options
author | Stig Sandbeck Mathisen <ssm@debian.org> | 2012-01-26 11:22:40 +0100 |
---|---|---|
committer | Stig Sandbeck Mathisen <ssm@debian.org> | 2012-01-26 11:22:40 +0100 |
commit | c17b3ba16e7013f06416f10b8752ef783f048717 (patch) | |
tree | 790f13f167199b954007e17d1c55a8d1b0218775 /spec/unit/application/apply_spec.rb | |
parent | 32af6143486ceb24a93636445d1883f5fe2299d7 (diff) | |
download | puppet-upstream/2.7.10.tar.gz |
Imported Upstream version 2.7.10upstream/2.7.10
Diffstat (limited to 'spec/unit/application/apply_spec.rb')
-rwxr-xr-x | spec/unit/application/apply_spec.rb | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb index b12c4fae9..07a39223c 100755 --- a/spec/unit/application/apply_spec.rb +++ b/spec/unit/application/apply_spec.rb @@ -20,7 +20,7 @@ describe Puppet::Application::Apply do Puppet::Node.indirection.cache_class = nil end - [:debug,:loadclasses,:verbose,:use_nodes,:detailed_exitcodes].each do |option| + [:debug,:loadclasses,:verbose,:use_nodes,:detailed_exitcodes,:catalog].each do |option| it "should declare handle_#{option} method" do @apply.should respond_to("handle_#{option}".to_sym) end @@ -53,6 +53,17 @@ describe Puppet::Application::Apply do @apply.handle_logdest("console") end + + it "should deprecate --apply" do + Puppet.expects(:warning).with do |arg| + arg.match(/--apply is deprecated/) + end + + command_line = Puppet::Util::CommandLine.new('puppet', ['apply', '--apply', 'catalog.json']) + apply = Puppet::Application::Apply.new(command_line) + apply.stubs(:run_command) + apply.run + end end describe "during setup" do |