Sha256: 3183affd9fc9e639ad3f73ab561fe7f4016be66f428fa40499e74d341f7d4edc

Contents?: true

Size: 959 Bytes

Versions: 5

Compression:

Stored size: 959 Bytes

Contents

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

module Pod
  describe Command::Package do
    it "uses additional spec repos passed on the command line" do
      SourcesManager.stubs(:search).returns(nil)
      nil::NilClass.any_instance.stubs(:install!)
      Installer.expects(:new).with { 
          |sandbox, podfile| podfile.sources == ['foo', 'bar'] 
        }

      command = Command.parse(%w{ package spec/fixtures/KFData.podspec --spec-sources=foo,bar})
      command.send(:install_pod, :osx)
    end

    it "uses only the master repo if no spec repos were passed" do
      SourcesManager.stubs(:search).returns(nil)
      nil::NilClass.any_instance.stubs(:install!)
      Installer.expects(:new).with { 
          |sandbox, podfile| podfile.sources == ['https://github.com/CocoaPods/Specs.git'] 
        }

      command = Command.parse(%w{ package spec/fixtures/KFData.podspec })
      command.send(:install_pod, :osx)
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
cocoapods-packager-1.3.0 spec/pod/utils_spec.rb
cocoapods-packager-1.2.1 spec/pod/utils_spec.rb
cocoapods-packager-1.2.0 spec/pod/utils_spec.rb
cocoapods-packager-1.1.1 spec/pod/utils_spec.rb
cocoapods-packager-1.1.0 spec/pod/utils_spec.rb