Class: ElasticResults::RSpec::Formatter

Inherits:
RSpec::Core::Formatters::BaseFormatter
  • Object
show all
Defined in:
lib/elastic_results/rspec.rb

Instance Method Summary collapse

Constructor Details

#initialize(output) ⇒ Formatter

Returns a new instance of Formatter.



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

def initialize(output)
  super
end

Instance Method Details

#close(_notification) ⇒ Object



30
31
32
# File 'lib/elastic_results/rspec.rb', line 30

def close(_notification)
  ElasticResults.write_urls
end

#example_failed(notification) ⇒ Object



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

def example_failed(notification)
  record_example notification.example
end

#example_passed(notification) ⇒ Object



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

def example_passed(notification)
  record_example notification.example
end

#record_example(example) ⇒ Object



26
27
28
# File 'lib/elastic_results/rspec.rb', line 26

def record_example(example)
  ElasticResults.index_result result_for(example)
end