Sha256: 29f861fc155d2b58db9784cdaf0f1d8b43a8dab1859c59a10c9afeaec94d68ba

Contents?: true

Size: 733 Bytes

Versions: 4

Compression:

Stored size: 733 Bytes

Contents

require 'app-store-emigrant'
require 'helpers'
require 'minitest/spec'
require 'minitest/autorun'

include AppStore::Emigrant

describe Library do
  
  before do
    @library = Library.new(ROOT + '/fixtures/dummy-library')
  end
  
  it 'must be located in a valid directory' do
    @library.must_be_instance_of Library
    
    lambda do
      Library.new(ROOT + '/non-existent-library')
    end.must_raise Library::DoesNotExist
  end
  
  it 'will gracefully and lazily load applications' do
    @library.instance_variable_get('@apps').must_be_nil
    @library.apps.must_be_instance_of Array
    @library.apps.length.must_equal 2
  end
  
  it 'can find applications' do
    @library.find('Dummy').length.must_equal 1
  end
  
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
app-store-emigrant-0.0.4 specs/library.rb
app-store-emigrant-0.0.3 specs/library.rb
app-store-emigrant-0.0.2 specs/library.rb
app-store-emigrant-0.0.1 specs/library.rb