【发布时间】:2012-07-16 19:38:47
【问题描述】:
我从我的测试中不明白这个错误
Failure/Error: get "new"
ActionController::RoutingError:
No route matches {:action=>"new", :controller=>"user"}
我的路线文件
Station::Application.routes.draw do
devise_for :users, :controllers => { :new => "new" }
这是我的测试
require 'spec_helper'
describe UserController do
it "should registrer new user" do
get "new"
fill_in "Email", :with => "abc@example.com"
fill_in "Password", :with => "abc123"
click_button "Sign up"
response.should have_content("Welcome! You have registrered successfully.")
end
end
【问题讨论】:
标签: ruby-on-rails rspec routing