Sha256: e05c90eb296ee7ce63dd968edeb4229516af2acf9a5b2323750724ff372d355f

Contents?: true

Size: 789 Bytes

Versions: 14

Compression:

Stored size: 789 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

14 entries across 14 versions & 1 rubygems

Version Path
chef-14.13.11-universal-mingw32 spec/unit/config_spec.rb
chef-15.0.300-universal-mingw32 spec/unit/config_spec.rb
chef-15.0.298-universal-mingw32 spec/unit/config_spec.rb
chef-15.0.293-universal-mingw32 spec/unit/config_spec.rb
chef-14.12.9-universal-mingw32 spec/unit/config_spec.rb
chef-14.12.3-universal-mingw32 spec/unit/config_spec.rb
chef-14.11.21-universal-mingw32 spec/unit/config_spec.rb
chef-14.10.9-universal-mingw32 spec/unit/config_spec.rb
chef-14.9.13-universal-mingw32 spec/unit/config_spec.rb
chef-14.8.12-universal-mingw32 spec/unit/config_spec.rb
chef-14.7.17-universal-mingw32 spec/unit/config_spec.rb
chef-14.6.47-universal-mingw32 spec/unit/config_spec.rb
chef-14.5.33-universal-mingw32 spec/unit/config_spec.rb
chef-14.3.37-universal-mingw32 spec/unit/config_spec.rb