scenario_progress_formatter.rb revision a44c794981080bb4ae655ed23bbe3dd1c930ab7b
def feature_name(keyword, name) @current_feature = "Feature: #{name}" @io.puts("#{keyword}: #{name}") def background_name(keyword, name, file_colon_line, source_indent) @processed_steps << "Background: #{name}" print_feature_element_name(keyword, name, file_colon_line, source_indent) def scenario_name(keyword, name, file_colon_line, source_indent) @processed_steps << "Scenario: #{name}" print_feature_element_name(keyword, name, file_colon_line, source_indent) def step_name(keyword, step_match, status, source_indent, background, file_colon_line) name_to_report = format_step(keyword, step_match, status, source_indent) @processed_steps << "Step: #{name_to_report}" def exception(exception, status) return if @hide_this_step @processed_steps << format_exception(exception, status, EXCEPTION_INDENT) def print_feature_element_name(keyword, name, file_colon_line, source_indent) names = name.empty? ? [name] : name.split("\n") line = "#{keyword}: #{names[0]}".indent(SCENARIO_INDENT) @io.print(' [...]') if names[1..-1].present? def print_summary(features) print_stats(features, @options) print_passing_wip(@options) def print_failure_details if @failed_scenario_steps.any? @io.puts(format_string("(::) steps of failed scenarios (::)", :failed)) @failed_scenario_steps.each do |failed_scenario| failed_scenario.each do |step| @io.puts step.indent(SCENARIO_INDENT) def format_exception(e, status, indent) message = "#{e.message} (#{e.class})".force_encoding("UTF-8") if ENV['CUCUMBER_TRUNCATE_OUTPUT'] message = linebreaks(message, ENV['CUCUMBER_TRUNCATE_OUTPUT'].to_i) string = "#{message}\n#{e.backtrace.join("\n")}".indent(indent) format_string(string, status)