Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialMalcolm McClellan
2,922 PointsGetting errors from create_spec.rb
Mt code is identical to the video, but i am still getting 1 example and 1 error. My code reads:
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
Could I be doing something wrong outside of this file?
2 Answers
Steve Hunter
57,712 PointsHi Malcolm,
What error are you getting?
And, yes, the code issue could be either in your test, as above, or in the view or model, perhaps. However, the error will let us know what the problem is, as it'll either be a code/syntax error of a failed test. Copy the whole error in and we can fix it from there.
Steve.
Houston Erekson
10,542 PointsI would suggest doing as Jason did in the video and follow your test on your live application. If a page doesnt show up when you click links manually they will come up as errors in the test.
go to your localhost url go to the /todo_lists page click on the New todo list link see if the page has the content youre looking for.