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 trialDavid Ho
1,482 PointsFailure/Error: click_link "New Todo list"
I got and Error - kindly help Here is my code :
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")
fill_in "Title", with: "My todo list"
fill_in "Description", with: "This is what I'm doing today"
click_button "Create Todo list"
expect(page).to have_content("My Todo list")
end
end
Here is my Error Message:
C:\Treehouse\Project\odot ((detached from d64afef))
Ī» rspec spec/features/todo_lists/create_spec.rb
F
Failures:
1) Creating todo lists redirects to the todo list index page on success
Failure/Error: click_link "New Todo list"
NoMethodError:
undefined method click_link' for #<RSpec::ExampleGroups::CreatingTodoLists:0x45c5cb8>
# ./spec/features/todo_lists/create_spec.rb:6:in
block (2 levels) in <top (required)>'
Finished in 0.001 seconds (files took 1 second to load)
1 example, 1 failure
Failed examples:
rspec ./spec/features/todo_lists/create_spec.rb:4 # Creating todo lists redirects to the todo list index page on succes C:\Treehouse\Project\odot ((detached from d64afef))
1 Answer
Salman Akram
Courses Plus Student 40,065 PointsHi David Ho,
Just wonder - are you using Window or Mac?
David Ho
1,482 PointsDavid Ho
1,482 PointsHi Salman Akram,
I'm using window . I wonder what this code means : undefined method click_link' for #<RSpec::ExampleGroups::CreatingTodoLists:0x45c5cb8> # ./spec/features/todo_lists/create_spec.rb:6:inblock (2 levels) in '
How to solve it?