Sha256: 4d2ec84bf477faa64ae73dbac0ee19d5edc0eded23172db62b8422d2425304f2

Contents?: true

Size: 554 Bytes

Versions: 21

Compression:

Stored size: 554 Bytes

Contents

require 'spec_helper'

describe Chef::Sugar::RunContext do
  it_behaves_like 'a chef sugar'

  describe '#includes_recipe?' do
    let(:node) { double(Chef::Node) }

    it 'returns true when the recipe exists' do
      allow(node).to receive(:recipe?).and_return(true)
      expect(described_class.includes_recipe?(node, 'foo')).to be true
    end

    it 'returns false when the recipe does not exist' do
      allow(node).to receive(:recipe?).and_return(false)
      expect(described_class.includes_recipe?(node, 'bar')).to be false
    end
  end
end

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
chef-sugar-ng-4.2.2 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-4.2.1 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-4.2.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-4.1.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-4.0.1 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-4.0.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.6.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.5.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.4.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.3.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.2.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.1.1 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.1.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.0.1 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-3.0.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-2.5.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-2.4.1 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-2.4.0 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-2.3.2 spec/unit/chef/sugar/run_context_spec.rb
chef-sugar-2.3.1 spec/unit/chef/sugar/run_context_spec.rb