1
如果我换我需要SSL路线在这样的块:功能测试路线与HTTPS约束
scope :protocol => "https://", :constraints => { :protocol =>
"https://" } do
resources :users, :only => [:new, :create, :edit, :update]
end
然后引用这些路由我所有的功能测试,现在 吐出RoutingErrors。事情是这样的:
put :update, :id => 123
ActionController::RoutingError: No route matches
{:id=>"123", :controller=>"users", :action=>"update"}
FWIW:
rake routes | grep update
user PUT /users/:id(.:format)
{:protocol=>"http://", :action=>"update", :controller=>"users"}
那么,是什么,我应该在我的功能测试 现在指定的协议?