This Gem::StreamUI subclass records input and output to StringIO for retrieval during tests.
Namespace
- MODULE Gem::MockGemUi::TTY
- CLASS Gem::MockGemUi::InputEOFError
- CLASS Gem::MockGemUi::SystemExitException
- CLASS Gem::MockGemUi::TermError
Methods
- A
- E
- I
- N
- O
- T
Class Public methods
new(input = "")
Link
Source: show
# File lib/rubygems/mock_gem_ui.rb, line 44 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
ask(question)
Link
Source: show
# File lib/rubygems/mock_gem_ui.rb, line 58 def ask question raise InputEOFError, question if @ins.eof? super end