Class: RSpecAtoms::DiscoveryFormatter

Inherits:
Object
  • Object
show all
Defined in:
lib/rspec_atoms/discovery_formatter.rb

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ DiscoveryFormatter

Returns a new instance of DiscoveryFormatter.



11
12
13
# File 'lib/rspec_atoms/discovery_formatter.rb', line 11

def initialize(output)
  @output = output
end

Instance Method Details

#close(_notification) ⇒ Object



21
22
23
# File 'lib/rspec_atoms/discovery_formatter.rb', line 21

def close(_notification)
  @output.flush
end

#example_started(notification) ⇒ Object



15
16
17
18
19
# File 'lib/rspec_atoms/discovery_formatter.rb', line 15

def example_started(notification)
  @output.puts(
    ExampleId.normalize(notification.example.id)
  )
end