Welcome to the Treehouse Community
Looking to learn something new?
Christopher Quinn9,943 Points
I'm having issues in the early stages of the build a todo list application videos.
I'm following along with the video and I'm running the command
and I get this message:
Finished in 0.31636 seconds 1 example, 1 failure
rspec ./spec/features/todo_lists/create_spec.rb:4 # Creating todo lists redirects to the todo list index page on success
I have it typed exactly as it is in the video. Open to ideas here.
require 'spec_helper' describe "Creating todo lists" do it "redirects to the todo list index page on success" do visit "/todo_lists" click_link "New Todo list" expect(page).to have_content("New Todo list") end end
Maciej Czuchnowski36,440 Points
OK, so in this case you should run the rails server and see for yourself what shows up after clicking that link. If it's what you expected, modify the test expectation from
expect(page).to have_content("New todo_list") to
expect(page).to have_content("New Todo List") on line 10. You probably modified the header in the new action view at some point. By default it was "New todo_list" and you got "New Todo List". Notice that this error tells you everything. It tells you what string it expected and what was the actual full content of the visited page:
in "New Todo List Title Description Back"