Rack rSpec Controller Tests with Rack Middleware issue
Posted
by Roman Gonzalez
on Stack Overflow
See other posts from Stack Overflow
or by Roman Gonzalez
Published on 2010-02-09T00:10:30Z
Indexed on
2010/04/01
1:23 UTC
Read the original article
Hit count: 633
Howdy,
I'm having big trouble testing with rSpec's controller API. Right now I'm using a middleware authentication solution (Warden), and when I run the specs, the proxy added by the middleware is not there, and all the authentication tests are throwing NilPointerException
s all over the place.
It seems rSpec is not adding the middleware to the final app on purpose, and I would like to know if there is a way to monkey patch rSpec in order to make that go.
I already tested the whole thing with cucumber, however this is a refactoring of an old authentication version and there is several Controller tests that depend on authentication logic in order to work.
Thanks in advance.
© Stack Overflow or respective owner