quote inside quote for then i should see cucumber prolmem rails
I can clearly see the text in browser.
characters should be "R"开发者_C百科, "P", or "B".
But when I write a step a cucumber step
Then I should see "characters should be \"R\", \"P\", or \"B\"."
It says its
Undefined step: "I should see "characters should be \"R\", \"P\", or \"B\"."" (Cucumber::Undefined)
and says to define the step as
Then /^I should see "([^"]*)"R\\"([^"]*)"P\\"([^"]*)"B\\"([^"]*)"$/ do |arg1, arg2, arg3, arg4|
pending # express the regexp above with the code you wish you had
end
Why is cucumber not recognizing this step?
Or is it the escaping problem of the quote inside quote?
Thanks
A Pystring might work. Use three doublequotes to indicate an entire line as a string.
Cucumber step
Then I should see
"""
characters should be "R", "P", or "B".
"""
Step definition
Then /^I should see "([^"]*)"$/ do |string|
pending # express the regexp above with the code you wish you had
end
精彩评论