2013-04-28 02:30:37 -04:00
|
|
|
if ENV["COVERAGE"]
|
|
|
|
require "simplecov"
|
|
|
|
SimpleCov.start
|
|
|
|
end
|
|
|
|
|
2012-12-06 19:52:37 -05:00
|
|
|
unless Object.const_defined? 'Pry'
|
|
|
|
$:.unshift File.expand_path '../../lib', __FILE__
|
|
|
|
require 'pry'
|
|
|
|
end
|
|
|
|
|
2012-12-08 20:08:16 -05:00
|
|
|
require 'mocha/api'
|
|
|
|
|
|
|
|
require 'pry/test/helper'
|
2012-12-09 14:42:41 -05:00
|
|
|
require 'helpers/bacon'
|
|
|
|
require 'helpers/mock_pry'
|
2012-12-23 03:03:29 -05:00
|
|
|
require 'helpers/repl_tester'
|
2012-12-06 19:52:37 -05:00
|
|
|
|
|
|
|
class Module
|
|
|
|
public :remove_const
|
|
|
|
public :remove_method
|
|
|
|
end
|
|
|
|
|
|
|
|
# turn warnings off (esp for Pry::Hooks which will generate warnings
|
|
|
|
# in tests)
|
|
|
|
$VERBOSE = nil
|
|
|
|
|
2012-12-08 17:56:57 -05:00
|
|
|
Pad = OpenStruct.new
|
|
|
|
def Pad.clear
|
|
|
|
@table = {}
|
|
|
|
end
|
|
|
|
|
2012-12-06 19:52:37 -05:00
|
|
|
# to help with tracking down bugs that cause an infinite loop in the test suite
|
|
|
|
if ENV["SET_TRACE_FUNC"]
|
|
|
|
require 'set_trace' if Pry::Helpers::BaseHelpers.rbx?
|
|
|
|
set_trace_func proc { |event, file, line, id, binding, classname|
|
|
|
|
STDERR.printf "%8s %s:%-2d %10s %8s\n", event, file, line, id, classname
|
|
|
|
}
|
|
|
|
end
|
2012-12-08 20:11:40 -05:00
|
|
|
|
|
|
|
puts "Ruby v#{RUBY_VERSION} (#{defined?(RUBY_ENGINE) ? RUBY_ENGINE : "ruby"}), Pry v#{Pry::VERSION}, method_source v#{MethodSource::VERSION}, CodeRay v#{CodeRay::VERSION}, Slop v#{Slop::VERSION}"
|