class Strut::ScenarioResult
Attributes
message[R]
name[RW]
result[R]
time[RW]
Public Class Methods
new()
click to toggle source
# File lib/strut/scenario_result.rb, line 12 def initialize @annotations = Hash.new { |h, k| h[k] = [] } @time = 0.0 end
Public Instance Methods
add_annotation_for_line(line, type, message = "")
click to toggle source
# File lib/strut/scenario_result.rb, line 29 def add_annotation_for_line(line, type, message = "") @annotations[line] << Annotation.new(type, message) end
add_exception_for_line(line, message)
click to toggle source
# File lib/strut/scenario_result.rb, line 25 def add_exception_for_line(line, message) add_annotation_for_line(line, ANNOTATION_EXCEPTION, message) end
add_fail_for_line(line, message)
click to toggle source
# File lib/strut/scenario_result.rb, line 21 def add_fail_for_line(line, message) add_annotation_for_line(line, ANNOTATION_FAIL, message) end
add_ok_for_line(line)
click to toggle source
# File lib/strut/scenario_result.rb, line 17 def add_ok_for_line(line) add_annotation_for_line(line, ANNOTATION_OK) end
annotations_for_line(line)
click to toggle source
# File lib/strut/scenario_result.rb, line 33 def annotations_for_line(line) @annotations[line] end