features/docs/extending_cucumber/custom_formatter.feature in cucumber-3.0.0.pre.1 vs features/docs/extending_cucumber/custom_formatter.feature in cucumber-3.0.0.pre.2
- old
+ new
@@ -39,10 +39,30 @@
I'LL USE MY OWN
JUST PRINT ME
"""
- Scenario: Use the legacy API
+ Scenario: Custom config
+ Given a file named "features/support/custom_formatter.rb" with:
+ """
+ module MyCustom
+ class Formatter
+ def initialize(config, options)
+ @io = config.out_stream
+ config.on_event :test_run_finished do |event|
+ @io.print options.inspect
+ end
+ end
+ end
+ end
+ """
+ When I run `cucumber features/f.feature --format MyCustom::Formatter,foo=bar,one=two`
+ Then it should pass with exactly:
+ """
+ {"foo"=>"bar", "one"=>"two"}
+ """
+
+ Scenario: Use the legacy API
This is deprecated and should no longer be used.
Given a file named "features/support/custom_legacy_formatter.rb" with:
"""
module MyCustom