Active Test Authentication plugin
Plugin details
Documentation
Install the plugin:
ruby script/plugin install http://mabs29.googlecode.com/svn/trunk/plugins/active_test_authentication
It provides two behaviours (+requires_login_on+ and +accepts_login_on+), two helper methods (+login_as+ and +logout+), and two assertions (+assert_requires_login+ and +assert_accepts_login+).
It assumes the following:
* You are using some variant of Acts As Authenticated (AAA).
* You have a +users+ fixture.
* You are using a User model for your users.
* +@controller.current_user+ is set to a User object.
* +@controller.current_user+ is the proof of being logged in (as per AAA).
== Example
class SomeControllerTest < ActiveTest::Controller setup def setup login_as :admin end requires_login_on :index accepts_login_on :index end
Further Documentation
There is currently no advanced documentation for this plugin.
New documentationEdit plugin | Back in time (2 older versions) | Last edited by: scott, 6 months ago

