I have the following step for checking that a validation message is
displayed on screen:
Then /^(.+) should be displayed$/ do |error|
msg = @browser.ul(:class, ‘validation-summary-errors’).li(:text,
msg.should_not == nil
I run scenario with examples table which contains expected error
messages. If I put wrong error message and pp line in step is commented
out as shown I get green result from Cucumber, which is wrong. When I
uncomment pp line I get exception
Unable to locate element, using :text, “BOOOOOOOOOO”
/^(.+) should be displayed$/' features/customer_details_full.feature:40:inThen should be
And step is shown as Red in Cucumber as it should.
Is this a bug in Cucumber or am I missing something?