Sha256: b67c98d5a7b78d64c111bbbd0a4596c4bb486e964e20fb129a851bfc6e04bd6f

Contents?: true

Size: 921 Bytes

Versions: 4

Compression:

Stored size: 921 Bytes

Contents

require "pd"
require "pa"

$spec_dir = File.expand_path("..", __FILE__)
$spec_data = File.join($spec_dir, "data")
$spec_tmp = File.join($spec_dir, "tmp")

RSpec.configure do |config|
  def capture(stream=:stdout)
    begin
      stream = stream.to_s
      eval "$#{stream} = StringIO.new"
      yield
      result = eval("$#{stream}").string
    ensure
      eval("$#{stream} = #{stream.upcase}")
    end

    result
  end

  alias :silence :capture
end

module RSpec
  module Core
    module DSL
      def xdescribe(*args, &blk)
        describe *args do
          pending 
        end
      end

      alias xcontext xdescribe
    end
  end
end

def public_all_methods(*klasses)
	klasses.each {|klass|
		klass.class_eval {
      public *(self.protected_instance_methods(false) + self.private_instance_methods(false))
      public_class_method *(self.protected_methods(false) + self.private_methods(false))
    }
	}
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
pa-1.4.0 spec/spec_helper.rb
pa-1.3.3 spec/spec_helper.rb
pa-1.3.2 spec/spec_helper.rb
pa-1.3.1 spec/spec_helper.rb