Broken for cucumber 2.x
Closed this issue · 2 comments
Deleted user commented
If a users uses cucumber
2.x, it does not work, but raises an error, because cucumber
2.x ahs a new api for reporters.
@tdreyno Using middleman
with cucumber 2.x
+ fivemat
fails, if a feature-test fails with the following error.
......super: no superclass method `exception' for #<Fivemat::Cucumber:0x000000037dcb18> (NoMethodError)
/home/user/.gem/ruby/2.2.2/gems/fivemat-1.3.1/lib/fivemat/cucumber.rb:29:in `exception'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/ignore_missing_messages.rb:10:in `method_missing'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/legacy_api/adapter.rb:997:in `describe_exception_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/legacy_api/adapter.rb:244:in `after_test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/legacy_api/adapter.rb:86:in `after_test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/legacy_api/adapter.rb:38:in `after_test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/fanout.rb:16:in `block in method_missing'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/fanout.rb:15:in `each'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/formatter/fanout.rb:15:in `method_missing'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/runner.rb:18:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/prepare_world.rb:11:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/apply_around_hooks.rb:8:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/apply_after_hooks.rb:5:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/apply_before_hooks.rb:5:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/apply_after_step_hooks.rb:8:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/activate_steps.rb:8:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/filters/quit.rb:11:in `test_case'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/case.rb:21:in `describe_to'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/filters/locations_filter.rb:17:in `block in done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/filters/locations_filter.rb:16:in `each'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/filters/locations_filter.rb:16:in `done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/filter.rb:61:in `done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/test/filters/tag_filter.rb:18:in `done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/compiler.rb:23:in `done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core/gherkin/parser.rb:31:in `done'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core.rb:29:in `parse'
/home/user/.gem/ruby/2.2.2/gems/cucumber-core-1.2.0/lib/cucumber/core.rb:18:in `compile'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/runtime.rb:70:in `run!'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/lib/cucumber/cli/main.rb:38:in `execute!'
/home/user/.gem/ruby/2.2.2/gems/cucumber-2.0.2/bin/cucumber:9:in `<main>'
emma-burrows commented
I've just come across this problem when copying the Fivemat Cucumber module code for a custom formatter. I guess previous versions of Cucumber formatters had an exception
method that Fivemat overrode?
Either way, removing the call to super
in /lib/fivemat/cucumber.rb#exception
seems to resolve the problem and still produce normal error handling:
def exception(exception, status)
@exceptions << [exception, status]
end
(it seems someone else thought of this before: si-mikey@c40f676)
tpope commented
Fixed a while back.