Sha256: 4c8ed9a0df775ff48149b2371543c6c5cd8f8d619a572947c70b9a3f0de00be7

Contents?: true

Size: 758 Bytes

Versions: 219

Compression:

Stored size: 758 Bytes

Contents

require "spec_helper"

require "chef/config"

RSpec.describe Chef::Config do

  shared_examples_for "deprecated by ohai but not deprecated" do
    it "does not emit a deprecation warning when set" do
      expect(Chef::Log).to_not receive(:warn)
        .with(/Ohai::Config\[:#{option}\] is deprecated/)
      Chef::Config[option] = value
      expect(Chef::Config[option]).to eq(value)
    end
  end

  describe ":log_level" do
    include_examples "deprecated by ohai but not deprecated" do
      let(:option) { :log_level }
      let(:value) { :debug }
    end
  end

  describe ":log_location" do
    include_examples "deprecated by ohai but not deprecated" do
      let(:option) { :log_location }
      let(:value) { "path/to/log" }
    end
  end

end

Version data entries

219 entries across 219 versions & 1 rubygems

Version Path
chef-18.6.2-universal-mingw-ucrt spec/unit/config_spec.rb
chef-18.6.2 spec/unit/config_spec.rb
chef-17.10.163-universal-mingw32 spec/unit/config_spec.rb
chef-17.10.163 spec/unit/config_spec.rb
chef-18.5.0-x64-mingw-ucrt spec/unit/config_spec.rb
chef-18.5.0 spec/unit/config_spec.rb
chef-18.4.12-x64-mingw-ucrt spec/unit/config_spec.rb
chef-18.4.12 spec/unit/config_spec.rb
chef-17.10.122-universal-mingw32 spec/unit/config_spec.rb
chef-17.10.122 spec/unit/config_spec.rb
chef-17.10.114-universal-mingw32 spec/unit/config_spec.rb
chef-17.10.114 spec/unit/config_spec.rb
chef-18.4.2-x64-mingw-ucrt spec/unit/config_spec.rb
chef-18.4.2 spec/unit/config_spec.rb
chef-17.10.95-universal-mingw32 spec/unit/config_spec.rb
chef-17.10.95 spec/unit/config_spec.rb
chef-18.3.0-x64-mingw-ucrt spec/unit/config_spec.rb
chef-18.3.0 spec/unit/config_spec.rb
chef-17.10.68-universal-mingw32 spec/unit/config_spec.rb
chef-18.2.7-x64-mingw-ucrt spec/unit/config_spec.rb