I’m implementing user registration Cucumber scenario. Intentionally
leaving CAPTCHA solution field empty I expect to pass my custom
THEN I should see “Captcha solution could not be blank”
(not exactly that message because of i18n, doesn’t matter)
but the scenario fails with the message: "expected the following
element’s content to include “Captcha solution could not be blank”.
Inspecting response content which was flushed below the error message I
could not find any validation error message indeed. That is why I doubt
validation was done at all.
Filling registration form with right the same data and posting it from
browser (in same env) results in expected validation errors appear
whithin the form.
So, my questions are:
should Rails behavior in cucumber and development environments be
equal if /config/environments/cucumber.rb equals
/config/environments/cucumber.rb in case they operate same data?
should ActiveRecord validation messages appear when cucumber scenario
fills a form with wrong values?
thanks in advance!