Flowdock
method

run_ended

Importance_0
RSpec latest stable (1.3.1) - 0 notes - Class: Spec::Runner::Formatter::Story::PlainTextFormatter

Method deprecated or moved

This method is deprecated or moved on the latest stable version. The last existing version (1.1.12) is shown here.

run_ended() public

No documentation

This method has no description. You can help the RSpec community by adding new notes.

Hide source
# File lib/spec/runner/formatter/story/plain_text_formatter.rb, line 106
          def run_ended
            summary_text = "#@count scenarios: #@successful_scenario_count succeeded, #{@failed_scenarios.size} failed, #@pending_scenario_count pending"
            if !@failed_scenarios.empty?
              @output.puts red(summary_text)
            elsif !@pending_steps.empty?
              @output.puts yellow(summary_text)
            else
              @output.puts green(summary_text)
            end
            unless @pending_steps.empty?
              @output.puts "\nPending Steps:"
              @pending_steps.each_with_index do |pending, i|
                story_name, scenario_name, msg = pending
                @output.puts "#{i+1}) #{story_name} (#{scenario_name}): #{msg}"
              end
            end
            unless @failed_scenarios.empty?
              @output.print "\nFAILURES:"
              @failed_scenarios.each_with_index do |failure, i|
                title, scenario_name, err = failure
                @output.print "\n    #{i+1}) "
                @output.print red("#{title} (#{scenario_name}) FAILED")
                @output.print red("\n    #{err.class}: #{err.message}")
                @output.print "\n    #{err.backtrace.join("\n")}\n"
              end
            end            
          end
Register or log in to add new notes.