Class: Roger::MockShell

Inherits:
Thor::Shell::Basic
  • Object
show all
Defined in:
lib/roger/testing/mock_shell.rb

Overview

A shell that does not output to stdout but will just have two StringIO objects which can be accessed by using #stdout and #stderr methods.

Instance Method Summary collapse

Instance Method Details

#stderrObject



14
15
16
# File 'lib/roger/testing/mock_shell.rb', line 14

def stderr
  @_stderr ||= StringIO.new
end

#stdoutObject



10
11
12
# File 'lib/roger/testing/mock_shell.rb', line 10

def stdout
  @_stdout ||= StringIO.new
end