Class: Rpruby::Cucumber::Formatter
- Inherits:
-
Object
- Object
- Rpruby::Cucumber::Formatter
- Defined in:
- lib/rpruby/cucumber/formatter.rb
Direct Known Subclasses
Instance Method Summary collapse
- #embed(*args) ⇒ Object
-
#initialize(config) ⇒ Formatter
constructor
private
A new instance of Formatter.
- #puts(message) ⇒ Object
Constructor Details
#initialize(config) ⇒ Formatter
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Formatter.
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/rpruby/cucumber/formatter.rb', line 9 def initialize(config) ENV['REPORT_PORTAL_USED'] = 'true' @io = config.out_stream @ast_lookup = if (::Cucumber::VERSION.split('.').map(&:to_i) <=> CucumberMessagesVersion) > 0 require 'cucumber/formatter/ast_lookup' ::Cucumber::Formatter::AstLookup.new(config) else nil end i[test_case_started test_case_finished test_step_started test_step_finished test_run_finished].each do |event_name| config.on_event event_name do |event| (event_name, event) end end config.on_event(:test_run_finished) { } end |
Instance Method Details
#embed(*args) ⇒ Object
37 38 39 |
# File 'lib/rpruby/cucumber/formatter.rb', line 37 def (*args) (:embed, *args) end |
#puts(message) ⇒ Object
31 32 33 34 35 |
# File 'lib/rpruby/cucumber/formatter.rb', line 31 def puts() (:puts, ) @io.puts() @io.flush end |