Strange Behaviour With Name-spaced Controller

Hey folks

I'm trying to track down the source of some weirdness with a
namespaced controller. I'm using Rick's RESTful Authentication
plugin. In this plugin you can override two methods to customize how
to ascertain authorized users and how to react to unauthorized users.
This is via a mixin residing in your lib directory, which is usually
included in ApplicationController.

Suppose you have a controller like...

class Admin::UsersController < ApplicationController

before_filter :login_required


  def authorized? # Called first by login_required.
    admin? # Let's pretend we fail right here

  # This _should_ be called as a result of authorized? failing. It's
never called!
  # Instead, the original method in the mixin is called!
  def access_denied
    redirect_to some_sensible_url

(Pastie'd here if the above is garbled:

As noted in the comments, I'm finding the access_denied method defined
in the mixin is being called instead of that in my controller ONLY
when I run "rake test:functionals", not when I run individual tests.

Have I lost my mind, or is some weird name-spacing stuff happening?

James Herdman

Sorry guys, it was my test suite acting all funny (Test/Spec).

James H