Class: ElasticResults::RSpec::Formatter
- Inherits:
-
RSpec::Core::Formatters::BaseFormatter
- Object
- RSpec::Core::Formatters::BaseFormatter
- ElasticResults::RSpec::Formatter
- Defined in:
- lib/elastic_results/rspec.rb
Instance Method Summary collapse
- #close(_notification) ⇒ Object
- #example_failed(notification) ⇒ Object
- #example_passed(notification) ⇒ Object
-
#initialize(output) ⇒ Formatter
constructor
A new instance of Formatter.
- #record_example(example) ⇒ Object
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 |