1use strict; 2use warnings; 3 4use Test::More tests => 2; 5 6BEGIN { 7 package MyApp::Controller::Foo; 8 9 use base qw/Catalyst::Controller/; 10 11 package MyApp::Controller::Root; 12 13 use base qw/Catalyst::Controller/; 14 15 __PACKAGE__->config(namespace => ''); 16 17 package Stub; 18 19 sub config { {} }; 20} 21 22is(MyApp::Controller::Foo->action_namespace('Stub'), 'foo'); 23 24is(MyApp::Controller::Root->action_namespace('Stub'), ''); 25