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.

General Discussion

Colin Stodd
Colin Stodd
3,160 Points

Error in the Scopes testing "Rails Tutorial"

I'm getting this error, and I cannot seem to find a fix....

1) Error: test_that_/logout_route_opens_the_log_out_page(CustomRoutesTest): NoMethodError: undefined method `assert_redirect_to' for test_that_/logout_route_opens_the_log_out_page(CustomRoutesTest):CustomRoutesTest

  test "that /logout route opens the log out page" do 
    get '/logout'
    assert_response :redirect 
    assert_redirect_to '/'
  end

Here is my Github link: https://github.com/cbstodd/treebook

1 Answer

Rodrigo Soares
Rodrigo Soares
2,460 Points

Misspelling! Should be: assert_redirected_to
and not : assert_redirect_to