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.



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

def initialize(*)
end

Class Attribute Details

.buildObject

Returns the value of attribute build.



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

def build
  @build
end

Instance Method Details

#example_failed(notification) ⇒ Object



19
20
21
22
23
24
25
# 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) ⇒ Object



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

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