Sha256: 641b914b35e1e0c9a6b463375aec8e0e4bbecf6797f83a8aed4a17703d634f6d

Contents?: true

Size: 658 Bytes

Versions: 6

Compression:

Stored size: 658 Bytes

Contents

require File.expand_path('../../spec_helper', __FILE__)

#This spec can only be run separately from the rest due to inclusion of fog library in other specs.
#rspec spec/unit/s3_source_deps_spec.rb

describe 'Check Dependencies', :exclude => Object.constants.include?(:Fog) do
  before(:each) do
  end
  it 'should not load fog by default' do
    begin
      Fog::Storage::AWS.new()
    rescue Exception => e
      expect(e).to be_a_kind_of(NameError)
    end
  end

  it 'lazy loads fog' do
    begin
      Chef::Knife::S3Source.fetch('test')
    rescue Exception => e
      expect(e).to be_a_kind_of(ArgumentError)
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
knife-ec2-0.18.0 spec/unit/s3_source_deps_spec.rb
knife-ec2-0.17.0 spec/unit/s3_source_deps_spec.rb
knife-ec2-0.16.0 spec/unit/s3_source_deps_spec.rb
knife-ec2-0.15.0 spec/unit/s3_source_deps_spec.rb
knife-ec2-0.14.0 spec/unit/s3_source_deps_spec.rb
knife-ec2-0.13.0 spec/unit/s3_source_deps_spec.rb