Class: Flatware::RSpec::Formatter

Inherits:
Object
  • Object
show all
Extended by:
Forwardable
Defined in:
lib/flatware/rspec/formatter.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(stdout) ⇒ Formatter

Returns a new instance of Formatter.



16
17
18
# File 'lib/flatware/rspec/formatter.rb', line 16

def initialize(stdout)
  @output = stdout
end

Instance Attribute Details

#outputObject (readonly)

Returns the value of attribute output.



14
15
16
# File 'lib/flatware/rspec/formatter.rb', line 14

def output
  @output
end

Instance Method Details

#closeObject



36
37
38
39
# File 'lib/flatware/rspec/formatter.rb', line 36

def close(*)
  Sink.client.checkpoint checkpoint
  @checkpoint = nil
end

#example_failed(_example) ⇒ Object



24
25
26
# File 'lib/flatware/rspec/formatter.rb', line 24

def example_failed(_example)
  send_progress :failed
end

#example_passed(_example) ⇒ Object



20
21
22
# File 'lib/flatware/rspec/formatter.rb', line 20

def example_passed(_example)
  send_progress :passed
end

#example_pending(_example) ⇒ Object



28
29
30
# File 'lib/flatware/rspec/formatter.rb', line 28

def example_pending(_example)
  send_progress :pending
end

#message(message) ⇒ Object



32
33
34
# File 'lib/flatware/rspec/formatter.rb', line 32

def message(message)
  Sink.client.message message
end