Welcome to the Treehouse Community
The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.
Justin Henderson
13,739 PointsRspec test fail
So I'm receiving the following error when running the rspec test. I'm not quite sure as to where the mistake might be in my Ruby file but here is the error code and my source code below. Any ideas?
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
1 Answer

Andrew Stelmach
12,583 PointsCan you post your html and your routes.rb?
Might be a simple typo; I noticed you used a lowercase 'l' in 'list', rather than a capital "L".
Justin Henderson
13,739 Pointshere is the routes rb below
Todo::Application.routes.draw do
resources :todo_lists
root 'todo_lists#index'
Which HTML file would you be referring to? There are several. Thank you for your help :)
Justin Henderson
13,739 PointsJustin Henderson
13,739 Pointswhoops, here is the error message as well:
Failures:
1) Creating todo lists redirects to the todo list index page on success Failure/Error: expect(page).to have_content("New Todo list") expected to find text "New Todo list" in "New todo_list Description Back" # ./spec/features/todo_lists/create_spec.rb:7:in `block (2 levels) in <top (required)>'