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 trial

Ruby Build a Todo List Application with Rails 4 Build a Todo List Application with Rails 4 Write Our First Tests

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Why do i get this message?

2 deprecation warnings total

Finished in 0.03223 seconds 1 example, 1 failure

Failed examples:

rspec ./spec/features/to-do-lists/create_spec.rb:4 # Creating to-do-lists redirects to the to-do-lists

This is my code: require 'spec_helper'

describe "Creating to-do-lists" do
        it "redirects to the to-do-lists" do
            visit "/to_do_lists"
            click "New To do list"
            expect(page).to have_content("New to_do_list") 
    end

end

1 Answer

Chris Shaw
Chris Shaw
26,676 Points

Hi José,

You have a few typos which will break your test, instead of an underscore/space between to and do this should be one word.

describe "Creating to-do-lists" do
        it "redirects to the to-do-lists" do
            visit "/todo_lists"
            click "New Todo list"
            expect(page).to have_content("New todo_list") 
    end
end

Hope that helps.

José Manuel Martínez López
José Manuel Martínez López
18,133 Points

Thanks for the tips, you actually gave me an idea of why i had that message. I forgot to type link after click, anyway thank you.