1
0
Fork 0
mirror of https://github.com/fog/fog.git synced 2022-11-09 13:51:43 -05:00
fog--fog/spec/fog/compute_spec.rb

21 lines
677 B
Ruby
Raw Normal View History

2014-12-10 19:07:40 -05:00
require "minitest/autorun"
require "fog"
describe Fog::Compute do
Fog::Compute.providers.each do |provider|
describe "when #{provider} is passed with no available credentials" do
it "returns ArgumentError" do
# Stub credentials so you still see errors where the tester really has credentials
Fog.stub :credentials, {} do
# These providers do not raise ArgumentError since they have no requirements defined
if [:openvz, :vmfusion].include?(provider)
assert Fog::Compute[provider]
else
assert_raises(ArgumentError) { Fog::Compute[provider] }
end
end
end
end
2014-12-10 19:07:40 -05:00
end
end