Sha256: 1df6dbf6bea04b6a96594ea8eae4c1f152dd5fd5b85aad866e26f00a93473170
Contents?: true
Size: 1 KB
Versions: 61
Compression:
Stored size: 1 KB
Contents
# frozen_string_literal: true module RSpec module Queue class BuildStatusRecorder ::RSpec::Core::Formatters.register self, :example_passed, :example_failed class << self attr_accessor :build end def initialize(*) end def example_passed(notification) example = notification.example build.record_success(example.id) end def example_failed(notification) example = notification.example build.record_error(example.id, [ notification.fully_formatted(nil), colorized_rerun_command(example), ].join("\n")) end private def colorized_rerun_command(example, colorizer=::RSpec::Core::Formatters::ConsoleCodes) colorizer.wrap("rspec #{example.location_rerun_argument}", RSpec.configuration.failure_color) + " " + colorizer.wrap("# #{example.full_description}", RSpec.configuration.detail_color) end def build self.class.build end end end end
Version data entries
61 entries across 61 versions & 1 rubygems