diff options
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 |