I have the following routes.rb file (part):
resource :user do
resources :orders do
post :verify, :on => :collection
end
end
My controller spec looks like follows:
require 'spec_helper'
describe OrdersController do
describe "#verify" do
it "verifies a recipe" do
post :verify
end
end
end
The spec fails with an ActionController::RoutingError No route matches {:controller=>"orders", :action=>"verify"} even though the route exists and correctly responds in a browser.