Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-07 Thread David Chelimsky
On Tue, Feb 7, 2012 at 4:11 AM, Patrick J. Collins wrote: >> Sorry, too quick to answer. >> Next clue is the fact that the RSpec error is ignoring your id attribute. >> try: >> post :share, :id => 42 >> and see if that gets you past the current error > > Yeah-- Unfortunatley I also had tried this

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-07 Thread Patrick J. Collins
> Sorry, too quick to answer. > Next clue is the fact that the RSpec error is ignoring your id attribute. > try: > post :share, :id => 42 > and see if that gets you past the current error Yeah-- Unfortunatley I also had tried this and got the same result... Patrick J. Collins http://collinatorst

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Andrew Timberlake
Sorry, too quick to answer. Next clue is the fact that the RSpec error is ignoring your id attribute. try: post :share, :id => 42 and see if that gets you past the current error Andrew On Tuesday 07 February 2012 at 7:05 AM, Patrick J. Collins wrote: > I tried that and got the same result, plus

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Justin Ko
On Feb 6, 2012, at 6:45 PM, Patrick J. Collins wrote: > I've got a share method in my controller, and I have the following spec: > > describe PostsController do > >describe "#share" do > > it "doesn't blow up" do >post :share, :id => @post.id Does @post actually have an id?

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Patrick J. Collins
I tried that and got the same result, plus rake routes says: share_post POST /posts/:id/share(.:format) {:action=>"share", :controller=>"posts"} NOT share_post POST /posts/:post_id/share(.:format) {:action=>"share", :controller=>"posts"} So I don't see how that can be the case... Patrick

Re: [rspec-users] nested route not receiving :id parameter within controller spec

2012-02-06 Thread Andrew Timberlake
The id belongs to post so your test line should be: post :share, :post_id => @post.id Andrew On Tuesday 07 February 2012 at 3:45 AM, Patrick J. Collins wrote: > I've got a share method in my controller, and I have the following spec: > > describe PostsController do > > describe "#share" do