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
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?
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
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
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
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
> 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