Sha256: 8d3f9dc311208a629c57780c87d08f5f0bcb0471c46b17c311809cca35207c3c

Contents?: true

Size: 718 Bytes

Versions: 11

Compression:

Stored size: 718 Bytes

Contents

# -*- coding: utf-8 -*-
require 'spec_helper'
require 'gemirro/versions_fetcher'

# VersionsFetcher tests
module Gemirro
  describe 'VersionsFetcher' do
    before(:each) do
      @source = Source.new('RubyGems', 'https://rubygems.org')
      @fetcher = VersionsFetcher.new(@source)
    end

    it 'should be initialized' do
      expect(@fetcher.source).to be(@source)
    end

    it 'should fetch versions' do
      allow(Gemirro.configuration.logger).to receive(:info)
        .once.with("Updating #{@source.name} (#{@source.host})")
      allow(@source).to receive(:fetch_versions).once.and_return([])
      allow(VersionsFile).to receive(:load).with([])
      expect(@fetcher.fetch).to be_nil
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
gemirro-0.10.5 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.10.4 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.10.3 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.10.2 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.10.1 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.10.0 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.9.1 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.9.0 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.8.1 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.8.0 spec/gemirro/versions_fetcher_spec.rb
gemirro-0.7.0 spec/gemirro/versions_fetcher_spec.rb