Forum: Ruby on Rails why do restful_authentication generated rspec tests fail?

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Da18f3db63f4f9edb6785c7f22295441?d=identicon&s=25 Jonathan (Guest)
on 2009-06-07 18:51
(Received via mailing list)
Been searching online for an answer to this without success - also
been digging through the documentation but I'm still very new to

I started a brand new app (rails 2.3.2), then the first thing I did
was install restful_authentication with the --rspec and --
include_activation options, then went through and followed the
directions for post install as detailed in the plugin documentation.
Performed a migration, then ran the rspec tests generated by the
plugin. The tests failed with 6 errors, which I wasn't expecting
because I haven't personally written a line of code yet, just used the
rails and restful_authentication generated code. Has anyone else run
into this?

Thanks in advance~
A91bd6cef23eb3516245a092e196c4da?d=identicon&s=25 Maurício Linhares (mauricio)
on 2009-06-07 19:01
(Received via mailing list)
They break 'cos they rely in a old Rspec behaviour for matching routes.

The best you can do is just remove all restful_auth specs and cucumber
scenarios (they're HORRIBLE, btw, you probably won't understand
anything anyway and any change is going to be a PITA) and just write
your own specs and Cucumber scenarios. Way more simpler than fixing
and keeping all those specs in your project.

But, if you're in to "fix' those specs, the problem is that routes
that are not expected to be used as GET requests should be matched
with this:

{ :path => '/users', :method => :post}

Instead of just "/users".

Maurício Linhares (pt-br) | (en)
Da18f3db63f4f9edb6785c7f22295441?d=identicon&s=25 Jonathan (Guest)
on 2009-06-07 19:19
(Received via mailing list)
Many thanks for the explanation. Just what I needed to know.

On Jun 8, 2:00 am, Maurício Linhares <>
280b78a61a968391b7e07e912be102a8?d=identicon&s=25 Robert Walker (robert4723)
on 2009-06-08 18:24
Jonathan wrote:
> Many thanks for the explanation. Just what I needed to know.
> On Jun 8, 2:00�am, Maur�cio Linhares <>

There are several forks of restful_authentication that have fixed the
rSpec failures, including mine at:

There is nothing different in my fork except the fixes for the specs.
B6a2e2c1454c56eb686c5a38b5f73d02?d=identicon&s=25 Joel Dezenzio (elricstorm)
on 2009-06-08 22:38
I'll look into your suggestion - thanks mate.
B6a2e2c1454c56eb686c5a38b5f73d02?d=identicon&s=25 Joel Dezenzio (elricstorm)
on 2009-06-08 23:12
Sigh - my apologies - I replied to the wrong post...
This topic is locked and can not be replied to.