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

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

2012-02-06 Thread Patrick J. Collins
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 end # ... etc And... It blows up! Failures: 1) PostsController#share shares Fa

Re: [rspec-users] testing framework for test automation

2012-02-06 Thread Matt Wynne
On 6 Feb 2012, at 08:20, Ze T wrote: >> Perhaps you could give us a little more background to what you are testing. >> Is it a web app? Is it written in Ruby? What type of testing are you >> looking at? Integration tests, unit tests. > > Looking to run functional tests on site like www.kodakgall

Re: [rspec-users] testing framework for test automation

2012-02-06 Thread Ze T
> Perhaps you could give us a little more background to what you are testing. > Is it a web app? Is it written in Ruby? What type of testing are you > looking at? Integration tests, unit tests. Looking to run functional tests on site like www.kodakgallery.com or www.shutterfly.com it might or migh