2011-08-02 2 views
0

개발 모드에서 브라우저를 가리켜 서 http://localhost:3000/brands/이라고 말하면 모든 브랜드 목록이 표시되어 경로 매핑, 컨트롤러의 색인 동작 및 index.html.haml 파일이 모두 자신의 작업을 수행하고 있습니다.오이가 개발 모드에서 볼 수있는 테스트 모드에서 경로를 찾지 못했습니다.

나는 rake db:test:clone을 기억하고 있습니다. /features/support/paths.rb에서

내가 가진 :

def path_to(page_name) 
    case page_name 
    when /the home\s?page/ 
    '/' 
    when /the Brand\s?page/ 
    '/brands' 
end 

하지만 cucumber features을 실행할 때 내가 얻을 :

When I am on the Brand page # features/step_definitions/web_steps.rb:44 
No route matches "/brands" (ActionController::RoutingError) 

당신은 어떻게이 문제의 원인을 찾아 가겠어요?

감사합니다.

스티븐.

+0

당신이 레이크 경로를 할 수 있고, 우리에게 특히 브랜드 경로에 대한 넣어 아웃하시기 바랍니다 제공? – jaydel

답변

0

을 사용하면 URL 도우미 레일 :

when /the Brand\s?page/ 
    brands_path 
관련 문제