Sha256: aebcc8fd29a4570e6a1971b1e4a59e6819be2db7d4ef1c04ac7c152c27e6e6cf
Contents?: true
Size: 671 Bytes
Versions: 6
Compression:
Stored size: 671 Bytes
Contents
require 'pry/test/helper' require 'minitest/autorun' require 'pry-byebug' require 'mocha/setup' # # Set I/O streams. Out defaults to an anonymous StringIO. # def redirect_pry_io(new_in, new_out = StringIO.new) old_in, old_out = Pry.input, Pry.output Pry.input, Pry.output = new_in, new_out begin yield ensure Pry.input, Pry.output = old_in, old_out end end def test_file(name) (Pathname.new(__FILE__) + "../examples/#{name}.rb").cleanpath.to_s end # # Simulate pry-byebug's input for testing # class InputTester def initialize(*actions) @orig_actions = actions.dup @actions = actions end def readline(*) @actions.shift end end
Version data entries
6 entries across 5 versions & 2 rubygems