Dear list,
In the app we are making we have a rout something like this:
map.resources :projects do |projects|
projects.resources :pages, :controller =>
“Wiki::Pages”, :path_prefix => “/projects/:project_id/
wiki”, :name_prefix => “project_wiki_”
end
But I can’t get RSpec(I’m very new to it) to accept this. It keeps
throwing errors:
ActionController::RoutingError in ‘Wiki::PagesController GET ‘create’
should be successful’
No route matches {:action=>“create”, :controller=>“wiki/
pages”, :project_id=>1}
I get why it throws these errors but not how to fix it. The relavant
RSpec:
it “GET ‘create’ should be successful” do
get ‘create’, :project_id => 1
response.should be_success
end
How do I modify the get request properly?
Thanks in advance!