Sha256: c2942bbb3afbe2ad33afd4609127497841d92d0f7939199c45e92dc8c3a3e88b
Contents?: true
Size: 1.09 KB
Versions: 20
Compression:
Stored size: 1.09 KB
Contents
require 'spec/runner/formatter/base_text_formatter' module Spec module Runner module Formatter class SpecdocFormatter < BaseTextFormatter def add_example_group(example_group) super output.puts output.puts example_group.description output.flush end def example_failed(example, counter, failure) message = if failure.expectation_not_met? "- #{example.description} (FAILED - #{counter})" else "- #{example.description} (ERROR - #{counter})" end output.puts(failure.expectation_not_met? ? red(message) : magenta(message)) output.flush end def example_passed(example) message = "- #{example.description}" output.puts green(message) output.flush end def example_pending(example_group_description, example, message) super output.puts yellow("- #{example.description} (PENDING: #{message})") output.flush end end end end end
Version data entries
20 entries across 20 versions & 4 rubygems