Im a noob to ROR and programming in general. i know enough to be dangerous but not enough to figure out where the hell i’m going wrong here. so this is what ive done so far.
-
wrote test:
-
tried to run test to enter text into 2 string fields (see below for errors)
thanks for your help with this!
Testing with Rspec and Capybara
**Testing Code used to run: **
require ‘spec_helper’
describe “Create User lists” do
it “redirects to the users list index page on success” do
visit “/users”
click_link “New User”
expect(page).to have_content(“New User”)
fill_in “First_Name”, with: “Shawn”
fill_in “Last_Name”, with: “Wilson”
click_button “Create User”
expect(page).to have_content(“Shawn”)
end
end
**error returned to console when run: **
Shawns-MacBook-Pro:SafeReporAPP TaurenLTD1$ bin/rspec spec/features/users/create_spec.rb
F
Failures:
- Create User lists redirects to the users list index page on success
Failure/Error: fill_in “First_Name”, with: “Shawn”
Capybara::ElementNotFound:
Unable to find field “First_Name”
./spec/features/users/create_spec.rb:9:in `block (2 levels) in <top (required)>’
Deprecation Warnings: