Sha256: 27bde663c98142230a8451cf7110d2f44adc0fbb2122b9ce66e16f17473c5f1b

Contents?: true

Size: 545 Bytes

Versions: 1

Compression:

Stored size: 545 Bytes

Contents

# encoding: utf-8

require 'rubygems'
require 'autotest'
require 'autotest-screen'


# Track original $stdout, $stderr write methods so we can “unmock” them for
# debugging

class << $stdout
  alias_method :real_write, :write
end
class << $stderr
  alias_method :real_write, :write
end


class Object
  def debug
    # For debugging, restore stubbed write
    class << $stdout
      alias_method :write, :real_write
    end
    class << $stderr
      alias_method :write, :real_write
    end

    require 'ruby-debug'
    debugger
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
autotest-screen-0.1.0.1 spec/spec_helper.rb