Sha256: 20cb6b5c5bc06d55d0f3f22ad50b961eeb758e5f9c6fe5e7d36a7d9b25b03991

Contents?: true

Size: 751 Bytes

Versions: 47

Compression:

Stored size: 751 Bytes

Contents

require 'spec_helper'

describe Vcloud do
  it { should be_initialized }

  it { should have(3).services }

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

    it { should == ":ecloud, :etest, :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

47 entries across 47 versions & 2 rubygems

Version Path
fog-0.3.16 spec/vcloud/bin_spec.rb
fog-0.3.15 spec/vcloud/bin_spec.rb
fog-0.3.14 spec/vcloud/bin_spec.rb
fog-0.3.13 spec/vcloud/bin_spec.rb
fog-0.3.12 spec/vcloud/bin_spec.rb
fog-0.3.11 spec/vcloud/bin_spec.rb
fog-0.3.10 spec/vcloud/bin_spec.rb
fog-0.3.9 spec/vcloud/bin_spec.rb
fog-0.3.8 spec/vcloud/bin_spec.rb
fog-0.3.7 spec/vcloud/bin_spec.rb
fog-0.3.6 spec/vcloud/bin_spec.rb
fog-0.3.5 spec/vcloud/bin_spec.rb
fog-0.3.4 spec/vcloud/bin_spec.rb
fog-0.3.3 spec/vcloud/bin_spec.rb
fog-0.3.2 spec/vcloud/bin_spec.rb
fog-0.3.1 spec/vcloud/bin_spec.rb
fog-0.3.0 spec/vcloud/bin_spec.rb
fog-0.2.30 spec/vcloud/bin_spec.rb
fog-0.2.28 spec/vcloud/bin_spec.rb
fog-0.2.27 spec/vcloud/bin_spec.rb