Class: ElasticResults::Cucumber::JSONFormatter
- Inherits:
-
Gherkin::Formatter::JSONFormatter
- Object
- Gherkin::Formatter::JSONFormatter
- ElasticResults::Cucumber::JSONFormatter
- Defined in:
- lib/elastic_results/cucumber.rb
Overview
Replacement for the stock Json formatter that outputs to elasticsearch
Instance Method Summary collapse
- #done ⇒ Object
- #eof ⇒ Object
-
#initialize ⇒ JSONFormatter
constructor
A new instance of JSONFormatter.
Constructor Details
#initialize ⇒ JSONFormatter
Returns a new instance of JSONFormatter.
14 15 16 17 |
# File 'lib/elastic_results/cucumber.rb', line 14 def initialize @feature_hashes = [] @current_step_or_hook = nil end |
Instance Method Details
#done ⇒ Object
26 27 28 |
# File 'lib/elastic_results/cucumber.rb', line 26 def done ElasticResults.write_urls end |
#eof ⇒ Object
19 20 21 22 23 24 |
# File 'lib/elastic_results/cucumber.rb', line 19 def eof feature_hash = @feature_hashes.last feature_hash['elements'].each do |scenario_hash| record_scenario feature_hash, scenario_hash end end |