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
Cucumber Expressions is a new alternative to
Regular Expressions, which is easier to read and write, and less daunting.
Expected Behavior
Step Defintions defined with a String (and not a Regexp) should be interpreted as a Cucumber Expression:
Given("I have {int} cuke(s) in my belly/stomach")do |cuke_count|
# It's already converted to a numberexpect(cuke_count).tobe_a(Fixnum)end
Likewise, if a Regular Expression is used (old school):
Given(/I have (\d+) cuke(?:s)? in my (?:belly|stomach)/do |cuke_count|
# It's already converted to a numberexpect(cuke_count).tobe_a(Fixnum)end
This is possible because the cucumber-expression library's Regexp support takes advantage of type conversions too.
Snippets for undefined steps should use Cucumber Expressions, and not Regular Expressions. We want users to start migrating, and if we can avoid it we'll not generate snippets with regular expressions. (Well, we might if enough people want it). The cucumber-expression library can already generate expressions from text.
Finally, the current Transform logic should be deprecated and the logic built into the cucumber-expression library should be used instead.
Context & Motivation
Having to use Regular Expressions is one of the most common complaints against Cucumber. Other clones of Cucumber who support something similar to Cucumber Expressions seem to have happier users!
The text was updated successfully, but these errors were encountered:
Summary
Cucumber Expressions is a new alternative to
Regular Expressions, which is easier to read and write, and less daunting.
Expected Behavior
Step Defintions defined with a
String
(and not aRegexp
) should be interpreted as a Cucumber Expression:Likewise, if a Regular Expression is used (old school):
This is possible because the
cucumber-expression
library'sRegexp
support takes advantage of type conversions too.Snippets for undefined steps should use Cucumber Expressions, and not Regular Expressions. We want users to start migrating, and if we can avoid it we'll not generate snippets with regular expressions. (Well, we might if enough people want it). The
cucumber-expression
library can already generate expressions from text.Finally, the current
Transform
logic should be deprecated and the logic built into thecucumber-expression
library should be used instead.Context & Motivation
Having to use Regular Expressions is one of the most common complaints against Cucumber. Other clones of Cucumber who support something similar to Cucumber Expressions seem to have happier users!
The text was updated successfully, but these errors were encountered: