Sha256: b5c63a5a6f68bbf7dcf1625830635537313a181007b311c365ec1b0975261dee

Contents?: true

Size: 469 Bytes

Versions: 21

Compression:

Stored size: 469 Bytes

Contents

require 'spec_helper'

describe Chef::Sugar::Kernel do
  describe '.require_chef_gem' do
    it 'raises an exception when the gem is not installed' do
      expect {
        described_class.require_chef_gem('bacon')
      }.to raise_error(Chef::Sugar::Kernel::ChefGemLoadError)
    end

    it 'loads the gem' do
      allow(Chef::Sugar::Kernel).to receive(:require).and_return(true)
      expect(described_class.require_chef_gem('bacon')).to be true
    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/kernel_spec.rb
chef-sugar-4.2.1 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-4.2.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-4.1.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-4.0.1 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-4.0.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.6.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.5.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.4.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.3.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.2.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.1.1 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.1.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.0.1 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-3.0.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-2.5.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-2.4.1 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-2.4.0 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-2.3.2 spec/unit/chef/sugar/kernel_spec.rb
chef-sugar-2.3.1 spec/unit/chef/sugar/kernel_spec.rb