class Strut::Report

Attributes

errors[R]
number_failed[R]
number_passed[R]
number_scenarios[R]
number_skipped[R]
scenario_results[R]

Public Class Methods

new() click to toggle source
# File lib/strut/report.rb, line 8
def initialize
  @scenario_results = []
  @errors = []
end

Public Instance Methods

add_error(error) click to toggle source
# File lib/strut/report.rb, line 17
def add_error(error)
  @errors << error
end
add_scenario_result(result) click to toggle source
# File lib/strut/report.rb, line 13
def add_scenario_result(result)
  @scenario_results << result
end
annotations_for_line(line) click to toggle source
# File lib/strut/report.rb, line 21
def annotations_for_line(line)
  all_annotations = @scenario_results.map do |result|
    result.annotations_for_line(line)
  end
  all_annotations.reject { |a| a.empty? }.flatten
end
number_with_result(result) click to toggle source
# File lib/strut/report.rb, line 44
def number_with_result(result)
  @scenario_results.select { |scenario| scenario.result == result }.count
end