Sha256: e6cddd67673fbe4ba6d09914f086ed6edfc4565f414347fd20cdb04318d6b6bb

Contents?: true

Size: 1 KB

Versions: 2

Compression:

Stored size: 1 KB

Contents

# frozen_string_literal: true

require 'bundler/setup'
require 'pp'
require 'rspec'
require 'cocoapods'

module Kernel
  # Like describe, but makes all private/protected instance methods of the clazz public
  def describe_with_private_methods(clazz, *additional_desc, &block)
    if clazz.is_a?(Module)
      methods = clazz.private_instance_methods(false) + clazz.protected_methods(false)
      clazz.send(:public, *methods)
    end
    describe(clazz, *additional_desc, &block)
  end
end

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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
cocoapods-pack-1.0.1 spec/spec_helper.rb
cocoapods-pack-1.0.0 spec/spec_helper.rb