Class: RspecFrameworkLedMatrix::StatusListener

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStatusListener

Returns a new instance of StatusListener.



11
12
13
# File 'lib/rspec/status_listener.rb', line 11

def initialize
  @statuses = []
end

Instance Attribute Details

#statusesObject (readonly)

Returns the value of attribute statuses.



9
10
11
# File 'lib/rspec/status_listener.rb', line 9

def statuses
  @statuses
end

Instance Method Details

#example_failed(_notification) ⇒ Object



22
23
24
25
# File 'lib/rspec/status_listener.rb', line 22

def example_failed(_notification)
  @statuses << :failed
  after_example
end

#example_passed(_notification) ⇒ Object



17
18
19
20
# File 'lib/rspec/status_listener.rb', line 17

def example_passed(_notification)
  @statuses << :passed
  after_example
end

#example_pending(_notification) ⇒ Object



27
28
29
30
# File 'lib/rspec/status_listener.rb', line 27

def example_pending(_notification)
  @statuses << :pending
  after_example
end