On Fri, Jul 27, 2012 at 4:45 AM, deepak <
kannan...@gmail.com> wrote:
>> I never found assert_generates useful for the way I approach testing.
>> If you give me an example of how/when you'd use it I can try to
>> explain
>
> bad habit mostly. to test cases where "url_for" is used
>
> eg. in rails3.0 routes like, post "ipn" => "payment#ipn"
> do not generate a url_helper automatically
> and url_for is used instead of adding the url_helper
I'm confused - you're using assert_generates to test thing's that
don't get generated? Wouldn't you use assert_recognizes in that case,
in which case you would treat it like any other route:
{ :post => "ipn" }.should route_to("payment#pin")
> --
> You received this message because you are subscribed to the Google Groups "rspec" group.
> To post to this group, send email to
rs...@googlegroups.com.
> To unsubscribe from this group, send email to
rspec+un...@googlegroups.com.
> For more options, visit
https://groups.google.com/groups/opt_out.
>
>