This Gem::StreamUI subclass records input and output to StringIO for retrieval during tests.

Namespace
Methods
E
I
N
O
T
Class Public methods
new(input = "")
# File lib/rubygems/mock_gem_ui.rb, line 33
def initialize(input = "")
  ins = StringIO.new input
  outs = StringIO.new
  errs = StringIO.new

  ins.extend TTY
  outs.extend TTY
  errs.extend TTY

  super ins, outs, errs, true

  @terminated = false
end
Instance Public methods
error()
# File lib/rubygems/mock_gem_ui.rb, line 55
def error
  @errs.string
end
input()
# File lib/rubygems/mock_gem_ui.rb, line 47
def input
  @ins.string
end
output()
# File lib/rubygems/mock_gem_ui.rb, line 51
def output
  @outs.string
end
terminate_interaction(status=0)
# File lib/rubygems/mock_gem_ui.rb, line 63
def terminate_interaction(status=0)
  @terminated = true

  raise TermError, status if status != 0
  raise SystemExitException
end
terminated?()
# File lib/rubygems/mock_gem_ui.rb, line 59
def terminated?
  @terminated
end