class RSpec::Queue::BuildStatusRecorder

Attributes

build[RW]

Public Class Methods

new(*) click to toggle source
# File lib/rspec/queue/build_status_recorder.rb, line 11
def initialize(*)
end

Public Instance Methods

example_failed(notification) click to toggle source
# File lib/rspec/queue/build_status_recorder.rb, line 19
def example_failed(notification)
  example = notification.example
  build.record_error(example.id, [
    notification.fully_formatted(nil),
    colorized_rerun_command(example),
  ].join("\n"))
end
example_passed(notification) click to toggle source
# File lib/rspec/queue/build_status_recorder.rb, line 14
def example_passed(notification)
  example = notification.example
  build.record_success(example.id)
end

Private Instance Methods

build() click to toggle source
# File lib/rspec/queue/build_status_recorder.rb, line 34
def build
  self.class.build
end
colorized_rerun_command(example, colorizer=::RSpec::Core::Formatters::ConsoleCodes) click to toggle source
# File lib/rspec/queue/build_status_recorder.rb, line 29
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