Class: RSpec::Queue::BuildStatusRecorder

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec/queue/build_status_recorder.rb

Class Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeBuildStatusRecorder

Returns a new instance of BuildStatusRecorder.



10
11
# File 'lib/rspec/queue/build_status_recorder.rb', line 10

def initialize(*)
end

Class Attribute Details

.buildObject

Returns the value of attribute build.



7
8
9
# File 'lib/rspec/queue/build_status_recorder.rb', line 7

def build
  @build
end

Instance Method Details

#example_failed(notification) ⇒ Object



18
19
20
21
22
23
24
# File 'lib/rspec/queue/build_status_recorder.rb', line 18

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) ⇒ Object



13
14
15
16
# File 'lib/rspec/queue/build_status_recorder.rb', line 13

def example_passed(notification)
  example = notification.example
  build.record_success(example.id)
end