class TestSystemRunner
System runner test double
Attributes
is_running[R]
Public Class Methods
new()
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 23 def initialize @log = [] end
Public Instance Methods
print_log()
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 45 def print_log p @log end
run(command)
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 27 def run(command) @log.append(command) @is_running = true end
run_with_output(command)
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 32 def run_with_output(command) @log.append(command) @is_running = true end
running?(command)
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 37 def running?(command) @log.include?(command) end
running_sequence?(*commands)
click to toggle source
# File lib/adx_toolkit/system_runner.rb, line 41 def running_sequence?(*commands) @log == commands end