Sha256: 5869b3c75417a676e21484c699cc3f942a80c4accf81f1c6cdffce6c4daa0b3e

Contents?: true

Size: 758 Bytes

Versions: 96

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

96 entries across 96 versions & 1 rubygems

Version Path
chef-13.12.14 spec/unit/config_spec.rb
chef-13.12.3 spec/unit/config_spec.rb
chef-13.11.3 spec/unit/config_spec.rb
chef-13.10.4 spec/unit/config_spec.rb
chef-13.10.0 spec/unit/config_spec.rb
chef-13.9.4 spec/unit/config_spec.rb
chef-14.2.0 spec/unit/config_spec.rb
chef-12.22.5 spec/unit/config_spec.rb
chef-12.22.5-universal-mingw32 spec/unit/config_spec.rb
chef-14.1.12 spec/unit/config_spec.rb
chef-14.1.1 spec/unit/config_spec.rb
chef-13.9.1 spec/unit/config_spec.rb
chef-14.0.202-universal-mingw32 spec/unit/config_spec.rb
chef-14.0.202 spec/unit/config_spec.rb
chef-12.22.3 spec/unit/config_spec.rb
chef-12.22.3-universal-mingw32 spec/unit/config_spec.rb
chef-14.0.190 spec/unit/config_spec.rb
chef-13.8.5 spec/unit/config_spec.rb
chef-13.8.3 spec/unit/config_spec.rb
chef-13.8.0 spec/unit/config_spec.rb