[rspec-users] RSpec, RESTful nested routes and :path_prefix

Harm Aarts harmaarts at gmail.com
Wed Nov 7 11:25:02 EST 2007

I think I did not express myself clear enough. The problem is that in  
my spec I can not get the 'post' and 'get' methods to correctly  
contact(by lack of a better word) the corresponding actions. I  
believe this has to do with the fact that I use a :path_prefix.
So I would like this:
>    it "GET 'index' should be successful" do
>      get 'index', :project_id => 1
>      response.should be_success
>    end

To become something like:
>    it "GET 'index' should be successful" do
>      get 'index', :project_id => , :path_prefix => '/wiki'
>      response.should be_success
>    end
But that obviously does not work.
More importantly I do not believe I should be repeating myself with  
these path_prefixes. I suspect that RSpec is ignoring  
the :path_prefix in my routes.rb file.

With kind regards,


More information about the rspec-users mailing list