summaryrefslogtreecommitdiff
path: root/spec/integration/recipes/noop_resource_spec.rb
blob: db6b6685533fa33133be112cf3313fef16ee0fbb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
require "support/shared/integration/integration_helper"

describe "Resources with a no-op provider" do
  include IntegrationSupport

  context "with noop provider providing foo" do
    before(:each) do
      class NoOpFoo < Chef::Resource
        resource_name "hi_there"
        default_action :update
      end
      Chef::Provider::Noop.provides :hi_there
    end

    it "does not blow up a run with a noop'd resource" do
      recipe = converge do
        hi_there "blah" do
          action :update
        end
      end
      expect(recipe.logged_warnings).to eq ""
    end
  end
end