Sha256: 30fd736c265989d12a9efdc6b3201a1dceed9da5af6bc2009d43dce0d9a05b80

Contents?: true

Size: 804 Bytes

Versions: 35

Compression:

Stored size: 804 Bytes

Contents

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
    expect(Chef::Log).to receive(:warn).with("Chef::ShellOut is deprecated, please use Mixlib::ShellOut")
    expect(Chef::Log).to 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
    expect(Chef::Log).to receive(:warn).with("Chef::Exceptions::ShellCommandFailed is deprecated, use Mixlib::ShellOut::ShellCommandFailed")
    expect(Chef::Log).to receive(:warn).with(/Called from\:/)
    Chef::Exceptions::ShellCommandFailed
  end
end

Version data entries

35 entries across 35 versions & 1 rubygems

Version Path
chef-12.6.0 spec/unit/shell_out_spec.rb
chef-12.6.0-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.5.1-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.5.1 spec/unit/shell_out_spec.rb
chef-12.4.3-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.4.3 spec/unit/shell_out_spec.rb
chef-12.4.2-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.4.2 spec/unit/shell_out_spec.rb
chef-12.5.0.alpha.1 spec/unit/shell_out_spec.rb
chef-12.4.1-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.4.1 spec/unit/shell_out_spec.rb
chef-12.4.0 spec/unit/shell_out_spec.rb
chef-12.4.0-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.4.0.rc.2 spec/unit/shell_out_spec.rb
chef-12.4.0.rc.2-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.4.0.rc.0 spec/unit/shell_out_spec.rb
chef-12.4.0.rc.0-universal-mingw32 spec/unit/shell_out_spec.rb
chef-12.3.0-x86-mingw32 spec/unit/shell_out_spec.rb
chef-12.3.0 spec/unit/shell_out_spec.rb
chef-12.3.0.rc.0-x86-mingw32 spec/unit/shell_out_spec.rb