Sha256: 37f0cef7ec4bb2e58660cd1227060017bdac31e87699b83629e043bb55497d0f
Contents?: true
Size: 627 Bytes
Versions: 6
Compression:
Stored size: 627 Bytes
Contents
require 'nc' class NcFirstFail < Nc if rspec_3? RSpec::Core::Formatters.register self, :example_failed end def example_failed(example) # For rspec3 example = example.example if example.respond_to?(:example) @failed_examples ||= [] if @failed_examples.size == 0 name = File.basename(File.expand_path '.') say "\u26D4 #{name}: Failure", "#{example.metadata[:full_description]}\n#{example.exception}" end @failed_examples << example end def dump_summary(*args) failure_count = self.class.rspec_3? ? args[0].failure_count : args[2] super if failure_count == 0 end end
Version data entries
6 entries across 6 versions & 2 rubygems