You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature: Reproduction for issue #1788Scenario: Using a top-level method() to populate the transformer of a ParameterTypeGiven a file named "features/test.feature" with:
""" Feature: Example Scenario: Sample Given a path named "example" """And a file named "features/support/env.rb" with:
""" require "pathname" ParameterType( name: "path", regexp: /"([^"]*)"/, transformer: method(:Pathname), ) """And a file named "features/step_definitions/all.rb" with:
""" Given("a path named {path}") do |actual| expected = Pathname("example") fail [actual, expected].inspect unless actual == expected end """When I run `cucumber -q`
Then it should pass with:
""" Feature: Reprod Scenario: Example Given a path named "example" 1 scenario (1 passed) 1 step (1 passed) """
📚 Any additional context?
If you replace the transformer value with a block/lambda/proc:
transformer: ->(x){Pathname(x)},
...then the issue is alleviated.
This issue does not seem to affect cucumber-8.0 + ruby-2.6
The text was updated successfully, but these errors were encountered:
Uh oh!
There was an error while loading. Please reload this page.
👓 What did you see?
✅ What did you expect to see?
No uncaught errors should have been raised/propagated to the top-level
📦 Which tool/library version are you using?
ruby (3.4.4)
cucumber (9.2.1)
cucumber-ci-environment (10.0.1)
cucumber-core (13.0.3)
cucumber-cucumber-expressions (17.1.0)
cucumber-gherkin (27.0.0)
cucumber-html-formatter (21.9.0)
cucumber-messages (22.0.0)
cucumber-tag-expressions (6.1.2)
🔬 How could we reproduce it?
📚 Any additional context?
If you replace the
transformer
value with a block/lambda/proc:...then the issue is alleviated.
This issue does not seem to affect
cucumber-8.0
+ruby-2.6
The text was updated successfully, but these errors were encountered: