--- /dev/null
+package MyApp1::Controller::Root;
+
+use Moose;
+use CatalystX::Routes;
+
+BEGIN { extends 'Catalyst::Controller' }
+
+__PACKAGE__->config()->{namespace} = q{};
+
+our %REQ;
+
+get q{} => args 0 => sub { $REQ{root}++ };
+
+get q{foo.txt} => args 0 => sub { $REQ{'foo.txt'}++ };
+
+1;
);
}
+{
+ request( GET '/' );
+
+ is(
+ $MyApp1::Controller::Root::REQ{root}, 1,
+ 'GET request for / went to the right sub (routes work when namespace is empty string)'
+ );
+
+ request( GET '/foo.txt' );
+
+ is(
+ $MyApp1::Controller::Root::REQ{'foo.txt'}, 1,
+ 'GET request for /foo.txt went to the right sub (routes work when namespace is empty string)'
+ );
+}
+
done_testing();