class Lucent::Tester
Public Class Methods
app_class=(name)
click to toggle source
# File lib/lucent/tester.rb, line 8 def self.app_class=(name) @@app_class = name end
new(command)
click to toggle source
# File lib/lucent/tester.rb, line 12 def initialize(command) args = shellwords(command) @argv = args[1..-1] @stdin = StringIO.new @stdout = StringIO.new @stderr = StringIO.new @kernel = MockKernel.new end
Public Instance Methods
run()
click to toggle source
# File lib/lucent/tester.rb, line 21 def run @@app_class.new(@argv, @stdin, @stdout, @stderr, @kernel).start end
stderr()
click to toggle source
# File lib/lucent/tester.rb, line 33 def stderr @stderr.string end
stdout()
click to toggle source
# File lib/lucent/tester.rb, line 29 def stdout @stdout.string end
stop()
click to toggle source
# File lib/lucent/tester.rb, line 25 def stop @kernel.exitstatus end