[rspec-users] [rspec, rails] Restful Routes in controller specs

David Chelimsky
Wed, 11 Mar 2009 13:39:41 -0000

On Wed, Mar 11, 2009 at 3:30 AM, Andi Schacke
<memberships.andi at gmail.com> wrote:
> Hi,
>
> how is it possible that I can use the restful routes helpers (e.g.
> new_user_path) in controller specs? I browsed the source code but I
> couldn''t find the magic. I''m just curious and would
appreciate any
> hint...

If you''re asking how to do it, you just do. There''s nothing
you have
to do. They''re there for free.

If you''re asking how they are there for free, controllers specs wrap
rails functional tests, so they have all the services provided by
rails.

Cheers,
David

>
> thanks
> Andi
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>