class Rutema::RunnerMessage

The Runner continuously sends these when executing tests

If there is an engine error (e.g. when parsing) you will get an ErrorMessage, if it is a test error you will get a RunnerMessage with :error in the status.

Attributes

duration[RW]
err[RW]
number[RW]
out[RW]
status[RW]

Public Class Methods

new(params) click to toggle source
Calls superclass method Rutema::Message::new
# File lib/rutema/core/framework.rb, line 40
def initialize params
  super(params)
  @duration=params.fetch("duration",0)
  @status=params.fetch("status",:none)
  @number=params.fetch("number",1)
  @out=params.fetch("out","")
  @err=params.fetch("err","")
end

Public Instance Methods

output() click to toggle source
# File lib/rutema/core/framework.rb, line 57
def output
  msg=""
  msg<<"#{@out}\n" unless @out.empty?
  msg<<@err unless @err.empty?
  return msg.chomp
end
to_s() click to toggle source
# File lib/rutema/core/framework.rb, line 49
def to_s
  msg="#{@test}:"
  msg<<"#{@text}." unless @text.empty?
  outpt=output()
  msg<<" Output:\n#{outpt}" unless outpt.empty? || @status!=:error
  return msg
end