Sha256: 45747e2379704a7a769d23954ed8542c329efd9b3ceb14d0cf63e2cc8afe2e19

Contents?: true

Size: 1.06 KB

Versions: 2

Compression:

Stored size: 1.06 KB

Contents

require 'rubygems'
require 'require_relative' if RUBY_VERSION < '1.9'

require_relative 'common.rb'

describe Deltacloud do

  it 'must provide list of available collections names' do
    Deltacloud.collection_names.wont_be_empty
    Deltacloud.collection_names.must_include :drivers
  end

  it 'must provide access to collection classes' do
    Deltacloud.collections.wont_be_empty
    Deltacloud.collections.must_include Deltacloud::Rabbit::DriversCollection
  end

  describe Deltacloud::Collections do

    it 'must return collection by name' do
      Deltacloud::Collections.must_respond_to :collection
      Deltacloud::Collections.collection(:drivers).wont_be_nil
      Deltacloud::Collections.collection(:drivers).must_equal Deltacloud::Rabbit::DriversCollection
    end

    it 'must provide access to Deltacloud Sinatra modules' do
      Deltacloud::Collections.must_respond_to :modules
      Deltacloud::Collections.modules(:deltacloud).wont_be_empty
      Deltacloud::Collections.modules(:deltacloud).must_include Deltacloud::Collections::Drivers
    end

  end


end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
deltacloud-core-1.1.3 tests/deltacloud/collections_test.rb
deltacloud-core-1.1.2 tests/deltacloud/collections_test.rb