[rspec-users] form_for url

Jonathan Linowes jonathan at parkerhill.com
Sat Sep 13 00:37:14 EDT 2008


hi,

I'm specing a view that contains

<% form_for @page, :url => { :action => :update },...

and get the error

No route matches {:action=>"update"}

In the spec, I've tried several things, including

it "should work" do
     assigns[:page] = mock_model(Page)
     request.env["HTTP_REFERER"] = "/pages/123/edit"
     request.request_url= "/pages/123/edit"
     render "pages/edit"
end

Suggestions?
thx



More information about the rspec-users mailing list