[Rails] Re: Functional Test Problem. Nubee, please help

Alan Francis
Thu, 27 Apr 2006 21:59:52 -0000

Allen wrote:
> ALl my controllers require the user to be logged in.  SO they will be
> redirected to my "login" controller.
>
> How do i login first in a functional test?  Im assuming i use the setup
> method to login the controller.

Functional tests are really unit tests for a controller.  They''re
really
designed to test a single controller in isolation.

It sounds like you might want to look at integration tests, new with 1.1
(I think)

http://jamis.jamisbuck.org/articles/2006/03/09/integration-testing-in-rails-1-1

Alan

--
Posted via http://www.ruby-forum.com/.