Sha256: 164e66251aec9bc571ba704d8e8351095d8e9860660d34fca72c843030005a7a

Contents?: true

Size: 743 Bytes

Versions: 19

Compression:

Stored size: 743 Bytes

Contents

require 'spec_helper'

describe Vcloud do
  it { should be_initialized }

  it { should have(2).services }

  describe "#registered_services" do
    subject { Vcloud.registered_services }

    it { should == ":ecloud, :vcloud" }
  end

  describe "when indexing it like an array" do
    describe "with a service that exists" do
      before do
        Fog::Vcloud.should_receive(:new).and_return(true)
      end
      it "should return something when indexed with a configured service" do
        Vcloud[:ecloud].should_not be_nil
      end
    end

    describe "with a service that does not exist" do
      it "should raise an ArgumentError" do
        lambda {Vcloud[:foozle]}.should raise_error(ArgumentError)
      end
    end

  end
end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
fog-0.2.0 spec/vcloud/bin_spec.rb
fog-0.1.10 spec/vcloud/bin_spec.rb
fog-0.1.9 spec/vcloud/bin_spec.rb
fog-0.1.8 spec/vcloud/bin_spec.rb
fog-0.1.7 spec/vcloud/bin_spec.rb
fog-0.1.6 spec/vcloud/bin_spec.rb
fog-0.1.5 spec/vcloud/bin_spec.rb
fog-0.1.4 spec/vcloud/bin_spec.rb
fog-0.1.3 spec/vcloud/bin_spec.rb
fog-0.1.2 spec/vcloud/bin_spec.rb
fog-0.1.1 spec/vcloud/bin_spec.rb
fog-0.1.0 spec/vcloud/bin_spec.rb
fog-0.0.100 spec/vcloud/bin_spec.rb
fog-0.0.99 spec/vcloud/bin_spec.rb
fog-0.0.98 spec/vcloud/bin_spec.rb
fog-0.0.97 spec/vcloud/bin_spec.rb
fog-0.0.96 spec/vcloud/bin_spec.rb
fog-0.0.95 spec/vcloud/bin_spec.rb
fog-0.0.94 spec/vcloud/bin_spec.rb