Note that there are some explanatory texts on larger screens.

plurals
  1. POCould not find field: "Name"
    primarykey
    data
    text
    <p>I am doing the Michael Hartl Rails 3 Tutorial, Chapter 8.4 pages 316-320. I run the users_spec.rb test and both tests don't pass with the following error:</p> <pre><code>Failures: 1) Users signup failure should not make a new user Failure/Error: fill_in "Name", :with =&gt; "" Webrat::NotFoundError: Could not find field: "Name" # ./spec/requests/users_spec.rb:12:in `block (5 levels) in &lt;top (required)&gt;' # ./spec/requests/users_spec.rb:10:in `block (4 levels) in &lt;top (required)&gt;' 2) Users signup success should make a new user Failure/Error: fill_in "Name", :with =&gt; "Example User" Webrat::NotFoundError: Could not find field: "Name" # ./spec/requests/users_spec.rb:28:in `block (5 levels) in &lt;top (required)&gt;' # ./spec/requests/users_spec.rb:26:in `block (4 levels) in &lt;top (required)&gt;' Finished in 3.97 seconds 2 examples, 2 failures** </code></pre> <p><strong>MY USERS_SPEC.RB FILE -</strong></p> <pre><code>require 'spec_helper' describe "Users" do describe "signup" do describe "failure" do it "should not make a new user" do lambda do visit signup_path fill_in "Name", :with =&gt; "" fill_in "Email", :with =&gt; "" fill_in "Password", :with =&gt; "" fill_in "Confirmation", :with =&gt; "" click_button response.should render_template('users/new') response.should have_selector("div#error_explanation") end.should_not change(User, :count) end end describe "success" do it "should make a new user" do lambda do visit signup_path fill_in "Name", :with =&gt; "Example User" fill_in "Email", :with =&gt; "user@example.com" fill_in "Password", :with =&gt; "foobar" fill_in "Confirmation", :with =&gt; "foobar" click_button response.should have_selector("div.flash.success",:content =&gt; "Welcome") response.should render_template('users/show') end.should change(User, :count).by(1) end end end end </code></pre> <p>Can anyone help me?</p> <p>Thank you!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload