Displaying 1 result from an estimated 1 matches for "assign_express".
2007 Nov 13
3
Story problem if parenthesis used in Given, When, Then or And
...c/lib/spec/story/world.rb:
92:in `Given''
stories/parenthesis_error_story.rb:10
Looks like the problem is in the Step#matches? method
since
"abc (re) def".match /abc (re) def/
returns nil
however
"abc (re) def".match /abc \(re\) def/
returns the match
The Step#assign_expression method when modifed as follows
def assign_expression(name)
expression = name.dup
if String === expression
while expression =~ /(\$\w*)/
expression.gsub!($1, "(.*)")
end
expression.gsub! ''(''...