Created
September 6, 2012 23:30
-
-
Save jeffmccune/3661339 to your computer and use it in GitHub Desktop.
tests for kick deprecation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/lib/puppet/application/kick.rb b/lib/puppet/application/kick.rb | |
index f0edbcf..f14ccac 100644 | |
--- a/lib/puppet/application/kick.rb | |
+++ b/lib/puppet/application/kick.rb | |
@@ -300,7 +300,7 @@ Copyright (c) 2011 Puppet Labs, LLC Licensed under the Apache 2.0 License | |
def setup | |
super() | |
raise Puppet::Error.new("Puppet kick is not supported on Microsoft Windows") if Puppet.features.microsoft_windows? | |
- Puppet.deprecation_warning "Puppet kick is deprecated. See http://tbd" | |
+ # Puppet.deprecation_warning "Puppet kick is deprecated. See http://tbd" | |
if options[:debug] | |
Puppet::Util::Log.level = :debug | |
diff --git a/spec/unit/application/kick_spec.rb b/spec/unit/application/kick_spec.rb | |
index cd1d950..51e1a4e 100755 | |
--- a/spec/unit/application/kick_spec.rb | |
+++ b/spec/unit/application/kick_spec.rb | |
@@ -121,6 +121,12 @@ describe Puppet::Application::Kick, :if => Puppet.features.posix? do | |
@kick.options.stubs(:[]).with(any_parameters) | |
end | |
+ it "should issue a warning that kick is deprecated" do | |
+ Puppet.expects(:deprecation_warning).with() { |msg| msg =~ /kick is deprecated/ } | |
+ @kick.setup | |
+ end | |
+ | |
+ | |
it "should abort stating that kick is not supported on Windows" do | |
Puppet.features.stubs(:microsoft_windows?).returns(true) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment