Sha256: 45fa90dcd89d7001e82882f829a25295288148de3c8b9c44846fb3f32811a666

Contents?: true

Size: 1.42 KB

Versions: 21

Compression:

Stored size: 1.42 KB

Contents

require 'coveralls'
Coveralls.wear!

require 'pathname'
ROOT = Pathname.new(File.expand_path('../../', __FILE__))
$:.unshift((ROOT + 'lib').to_s)
$:.unshift((ROOT + 'spec').to_s)

require 'bundler/setup'
require 'bacon'
require 'mocha-on-bacon'
require 'pretty_bacon'
require 'cocoapods'

require 'cocoapods_plugin'

#-----------------------------------------------------------------------------#

module Pod

  # Disable the wrapping so the output is deterministic in the tests.
  #
  UI.disable_wrap = true

  # Redirects the messages to an internal store.
  #
  module UI
    @output = ''
    @warnings = ''

    class << self
      attr_accessor :output
      attr_accessor :warnings

      def puts(message = '')
        @output << "#{message}\n"
      end

      def warn(message = '', actions = [])
        @warnings << "#{message}\n"
      end

      def print(message)
        @output << message
      end
    end
  end
end

#-----------------------------------------------------------------------------#

module SpecHelper
  def self.fixture(name)
    Fixture.fixture(name)
  end

  def self.temporary_directory
    ROOT + 'tmp'
  end

  module Fixture
    ROOT = Pathname('fixtures').expand_path(__dir__)

    def fixture(name)
      ROOT + name
    end
    module_function :fixture
  end
end

module Bacon
  class Context
    include SpecHelper::Fixture

    def temporary_directory
      SpecHelper.temporary_directory
    end
  end
end

Version data entries

21 entries across 21 versions & 9 rubygems

Version Path
cocoapods-packager-next-2.0.1 spec/spec_helper.rb
cocoapods-packager-next-2.0.0 spec/spec_helper.rb
cocoapods-packagerthk-1.0.4 spec/spec_helper.rb
cocoapods-packagerthk-1.0.3 spec/spec_helper.rb
cocoapods-packagerthk-1.0.2 spec/spec_helper.rb
cocoapods-packagerthk-1.0.1 spec/spec_helper.rb
cocoapods-packagerthk-1.0.0 spec/spec_helper.rb
cocoapods-packagerthk-0.0.1 spec/spec_helper.rb
cocoapods-packager-test-scl-1.6.2 spec/spec_helper.rb
cocoapods-packager-test-scl-1.6.1 spec/spec_helper.rb
cocoapods-packager-test-scl-1.6.0 spec/spec_helper.rb
cocoapods-packager-test-scl-1.5.0 spec/spec_helper.rb
cocoapods-packager-clone-master-1.5.2 spec/spec_helper.rb
cocoapods-nepackage-0.0.2 spec/spec_helper.rb
cocoapods-gd-0.0.3 spec/spec_helper.rb
cocoapods-gd-0.0.2 spec/spec_helper.rb
cocoapods-gd-0.0.1 spec/spec_helper.rb
cocoapods-nepackage-0.0.1 spec/spec_helper.rb
cocoapods-packager-mls-1.5.0.21 spec/spec_helper.rb
cocoapods-packager-tal-1.5.0.19 spec/spec_helper.rb