I am trying to learn how to use a cucumber and got this problem:
I have a form that:
<p> <%= f.label :name, "Nome" %><br /> <%= f.text_field :name %> </p>
And in my cucumber function, I have:
And I fill in "name" with "Reitoria do Porto"
This will cause the test to fail:
And I fill in "name" with "Reitoria do Porto" # features/step_definitions/web_steps.rb:34 Could not find field: "name" (Webrat::NotFoundError) (eval):2:in `fill_in' ./features/step_definitions/web_steps.rb:35:in `/^(?:|I )fill in "([^\"]*)" with "([^\"]*)"$/' features/manage_institutions.feature:10:in `And I fill in "name" with "Reitoria do Porto"'
However, if I simply create the form as follows:
<p> <%= f.label :name %><br /> <%= f.text_field :name %> </p>
The test passes.
How can I save my own shortcut name and make a test pass?
source share