Sha256: e4ec9fb49eb1a4b610f39ea66dfc61b583274f68709b4a45cea4d00947c06385

Contents?: true

Size: 1.16 KB

Versions: 1

Compression:

Stored size: 1.16 KB

Contents

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

module Pod
  describe 'Packager' do
    after do
        Dir.glob("CPDColors-*").each { |dir| Pathname.new(dir).rmtree }
      end

    it 'presents the help if a directory is provided' do
      should.raise CLAide::Help do
        command = Command.parse(%w{ package spec })
      end.message.should.match /is a directory/
    end

    it 'presents the help if a random file is provided instead of a specification' do
      should.raise CLAide::Help do
        command = Command.parse(%w{ package README.md })
      end.message.should.match /is not a podspec/
    end

    it 'presents the help if a podspec with binary-only dependencies is used' do
      command = Command.parse(%w{ package spec/fixtures/CPDColors.podspec })
      should.raise CLAide::Help do
        command.validate!
      end.message.should.match /binary-only/
    end

    it 'can package a podspec with binary-only dependencies if --no-mangle is specified' do
      command = Command.parse(%w{ package spec/fixtures/CPDColors.podspec --no-mangle })
      command.run

      true.should == true  # To make the test pass without any shoulds
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cocoapods-packager-0.9.0 spec/command/error_spec.rb