Sha256: 968e025c28036ecd70b82c661b764bce5e3917fb6d3a300dc43d5c78dfb3e53a

Contents?: true

Size: 1002 Bytes

Versions: 10

Compression:

Stored size: 1002 Bytes

Contents

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

describe CocoaPodsStats::SpecsRepoValidator do
  describe 'validates' do
    it 'returns no when given a nil' do
      subject = CocoaPodsStats::SpecsRepoValidator.new
      subject.should.not.validates?(nil)
    end

    it 'returns no when given a source with no url' do
      source = mock(:url => nil)

      subject = CocoaPodsStats::SpecsRepoValidator.new
      subject.should.not.validates?(source)
    end

    it 'returns no when given a master repo that is not cocoapods/specs' do
      sources = mock
      sources.stubs(:url).returns('CocoaPods/NotSpecs.git')

      subject = CocoaPodsStats::SpecsRepoValidator.new
      subject.should.not.validates?(sources)
    end

    it 'returns yes when given a master repo that is cocoapods/specs' do
      sources = mock
      sources.stubs(:url).returns('CocoaPods/Specs.git')

      subject = CocoaPodsStats::SpecsRepoValidator.new
      subject.should.validates?(sources)
    end
  end
end

Version data entries

10 entries across 10 versions & 2 rubygems

Version Path
cocoapods-dependency-html-0.0.2 vendor/bundle/gems/cocoapods-stats-1.1.0/spec/validator_spec.rb
cocoapods-dependency-html-0.0.1 vendor/bundle/gems/cocoapods-stats-1.1.0/spec/validator_spec.rb
cocoapods-stats-1.1.0 spec/validator_spec.rb
cocoapods-stats-1.0.0 spec/validator_spec.rb
cocoapods-stats-1.0.0.rc.1 spec/validator_spec.rb
cocoapods-stats-1.0.0.beta.4 spec/validator_spec.rb
cocoapods-stats-1.0.0.beta.3 spec/validator_spec.rb
cocoapods-stats-1.0.0.beta.2 spec/validator_spec.rb
cocoapods-stats-1.0.0.beta.1 spec/validator_spec.rb
cocoapods-stats-0.6.2 spec/validator_spec.rb