i want to strip a quote in the following cucumber expression, but i get unknown step error
Then I should see "[\"20257\"]\n"
Cucumber suggested me this :(
Then /^I should see "([^"]*)"(\d+)\\"([^"]*)"$/ do |arg1, arg2, arg3|
pending # express t开发者_C百科he regexp above with the code you wish you had
end
Any ideas, how to strip in this step?
How about writing:
Then I should see "["20257"]\n"
With the step being:
Then /^I should see "(.*)"$/ do |txt|
txt.gsub!('\n', "\n")
# ...
end
Or you could use the multiline argument """
and not even have to worry about the \n
substitution.
精彩评论