0

我在paths.rb中有一条路径:

when /the page for CA/
   '/CA-area-code'

但是,我想对路径的一部分进行正则表达式,以便它在特征步骤中从正则表达式中提取值。像这样:

when /the Phone SEO page for (.*)/
   '/#{foo}-area-code'
4

1 回答 1

0
when /the Phone SEO page for (.*)/
   '/#{$1}-area-code'

应该这样做。

于 2012-09-12T07:19:50.823 回答