Skip to content

Commit

Permalink
added test for correct dependency loading
Browse files Browse the repository at this point in the history
  • Loading branch information
Igorshp committed May 19, 2015
1 parent 3e9fc2d commit 003fee6
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions spec/unit/s3_source_deps_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
require File.expand_path('../../spec_helper', __FILE__)

describe 'Check Dependencies' 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

0 comments on commit 003fee6

Please sign in to comment.