2011-02-17 13:44:46 -05:00
|
|
|
require 'ecloud/spec_helper'
|
|
|
|
|
|
|
|
describe 'Ecloud' do
|
|
|
|
|
2011-05-24 16:16:48 -04:00
|
|
|
it do
|
|
|
|
pending unless Ecloud.available?
|
|
|
|
Ecloud.should have_at_least(1).services
|
|
|
|
end
|
2011-02-17 13:44:46 -05:00
|
|
|
|
|
|
|
describe "when indexing it like an array" do
|
2011-05-24 16:16:48 -04:00
|
|
|
|
|
|
|
|
2011-02-17 13:44:46 -05:00
|
|
|
describe "with a service that exists" do
|
|
|
|
it "should return something when indexed with a configured service" do
|
2011-05-24 16:16:48 -04:00
|
|
|
pending unless Ecloud.available?
|
2011-06-20 18:00:48 -04:00
|
|
|
Fog::Compute[:ecloud].should_not be_nil
|
2011-02-17 13:44:46 -05:00
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
describe "with a service that does not exist" do
|
|
|
|
it "should raise an ArgumentError" do
|
2011-05-24 16:16:48 -04:00
|
|
|
pending unless Ecloud.available?
|
2011-02-17 13:44:46 -05:00
|
|
|
lambda {Ecloud[:foozle]}.should raise_error(ArgumentError)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|