Sha256: 0d433ae3de6d3ea318b0622de68c6a8b85eb94bcc79bb490544050524fbe1b56

Contents?: true

Size: 814 Bytes

Versions: 3

Compression:

Stored size: 814 Bytes

Contents

require File.expand_path('../spec_helper', __FILE__)

WHITELIST_PATH = './spec/mocks/whitelist.json'

describe WhitelistResolver do
    describe 'functionality' do
        it 'whitelist should be loaded from an specific url' do
            whitelist = WhitelistResolver.instance.get_whitelist(WHITELIST_PATH)
            whitelist.size.should.equal 6
        end
        
        it 'if not URL is specified, whitelist comes from default URL' do
            whitelist = WhitelistResolver.instance.get_whitelist
            whitelist.should.not.empty?
        end

        it 'whitelist should not be loaded twice' do
            WhitelistResolver.instance.get_whitelist(WHITELIST_PATH)
            loaded = WhitelistResolver.instance.whitelist_loaded

            loaded.should.be.true    
        end
    end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
cocoapods-whitelist-0.3.0 spec/whitelist_resolver_spec.rb
cocoapods-whitelist-0.2.1 spec/whitelist_resolver_spec.rb
cocoapods-whitelist-0.2.0 spec/whitelist_resolver_spec.rb