Sha256: f1a0d7e192f2c7a2549ff6760a50af9e9a935c83ec0835af41a09dde162d4fcc

Contents?: true

Size: 1.62 KB

Versions: 4

Compression:

Stored size: 1.62 KB

Contents

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

module Pod
  describe Command::Spec::Package do
    describe 'IntegrationTests' do
      after do
        Dir.glob("NikeKit-*").each { |dir| Pathname.new(dir).rmtree }
        Dir.glob("LibraryDemo-*").each { |dir| Pathname.new(dir).rmtree }
        FileUtils.rm_rf('spec/fixtures/PackagerTest/NikeKit.framework')
      end

  	 it 'Allow integration into project alongside CocoaPods' do
        SourcesManager.stubs(:search).returns(nil)

        command = Command.parse(%w{ package spec/fixtures/NikeKit.podspec })
        command.run
        `cp -Rp NikeKit-*/ios/NikeKit.framework spec/fixtures/PackagerTest`

        log = ''

        Dir.chdir('spec/fixtures/PackagerTest') do
          `pod install 2>&1`
          log << `xcodebuild -workspace PackagerTest.xcworkspace -scheme PackagerTest -sdk iphonesimulator CODE_SIGN_IDENTITY=- 2>&1`
        end

        puts log if $?.exitstatus != 0
        $?.exitstatus.should == 0
  	 end

     it 'allows integration of a library without dependencies' do
        SourcesManager.stubs(:search).returns(nil)

        command = Command.parse(%w{ package spec/fixtures/LibraryDemo.podspec })
        command.run

        log = ''

        Dir.chdir('spec/fixtures/LibraryConsumerDemo') do
          `pod install 2>&1`
          log << `xcodebuild -workspace LibraryConsumer.xcworkspace -scheme LibraryConsumer 2>&1`
          log << `xcodebuild -sdk iphonesimulator -workspace LibraryConsumer.xcworkspace -scheme LibraryConsumer 2>&1`
        end

        puts log if $?.exitstatus != 0
        $?.exitstatus.should == 0
     end 
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
cocoapods-packager-1.3.0 spec/integration/project_spec.rb
cocoapods-packager-1.2.1 spec/integration/project_spec.rb
cocoapods-packager-1.2.0 spec/integration/project_spec.rb
cocoapods-packager-1.1.1 spec/integration/project_spec.rb