diff options
Diffstat (limited to 'actionpack/test/abstract_unit.rb')
-rw-r--r-- | actionpack/test/abstract_unit.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/actionpack/test/abstract_unit.rb b/actionpack/test/abstract_unit.rb index a21b00915e..07ba37c51c 100644 --- a/actionpack/test/abstract_unit.rb +++ b/actionpack/test/abstract_unit.rb @@ -62,8 +62,20 @@ module ActionController } Base.session_store = nil + class << Routing + def possible_controllers + @@possible_controllers ||= [] + end + end + class Base include ActionController::Testing + + def self.inherited(klass) + name = klass.name.underscore.sub(/_controller$/, '') + ActionController::Routing.possible_controllers << name unless name.blank? + super + end end Base.view_paths = FIXTURE_LOAD_PATH |