Sha256: 0a3643683c12576cbaedcb9b6aa79d69f1e75c5923806402df09c9786888a8c2

Contents?: true

Size: 1.53 KB

Versions: 7

Compression:

Stored size: 1.53 KB

Contents

# Set up coverage analysis
#-----------------------------------------------------------------------------#

if RUBY_VERSION >= '1.9.3'
  require 'codeclimate-test-reporter'
  CodeClimate::TestReporter.configure do |config|
    config.logger.level = Logger::WARN
  end
  CodeClimate::TestReporter.start
end

# Set up
#-----------------------------------------------------------------------------#

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 'webmock'
WebMock.disable_net_connect!(:allow => 'codeclimate.com')

require 'cocoapods'

require 'cocoapods_plugin'

# Helpers
#-----------------------------------------------------------------------------#

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 Bacon
  class Context
    alias_method :after_webmock, :after
    def after(&block)
      after_webmock do
        block.call
        WebMock.reset!
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
cocoapods-trunk-0.6.4 spec/spec_helper.rb
cocoapods-trunk-0.6.3 spec/spec_helper.rb
cocoapods-trunk-0.6.2 spec/spec_helper.rb
cocoapods-trunk-0.6.1 spec/spec_helper.rb
cocoapods-trunk-0.6.0 spec/spec_helper.rb
cocoapods-trunk-0.5.1 spec/spec_helper.rb
cocoapods-trunk-0.5.0 spec/spec_helper.rb