diff options
Diffstat (limited to 'spec/unit/shell_out_spec.rb')
-rw-r--r-- | spec/unit/shell_out_spec.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/spec/unit/shell_out_spec.rb b/spec/unit/shell_out_spec.rb new file mode 100644 index 0000000000..1330dd16de --- /dev/null +++ b/spec/unit/shell_out_spec.rb @@ -0,0 +1,18 @@ +require File.expand_path('../../spec_helper', __FILE__) + +describe "Chef::ShellOut deprecation notices" do + it "logs a warning when initializing a new Chef::ShellOut object" do + Chef::Log.should_receive(:warn).with("Chef::ShellOut is deprecated, please use Mixlib::ShellOut") + Chef::Log.should_receive(:warn).with(/Called from\:/) + Chef::ShellOut.new("pwd") + end +end + +describe "Chef::Exceptions::ShellCommandFailed deprecation notices" do + + it "logs a warning when referencing the constant Chef::Exceptions::ShellCommandFailed" do + Chef::Log.should_receive(:warn).with("Chef::Exceptions::ShellCommandFailed is deprecated, use Mixlib::ShellOut::ShellCommandFailed") + Chef::Log.should_receive(:warn).with(/Called from\:/) + Chef::Exceptions::ShellCommandFailed + end +end |