And lets have a test that the reflector works in interface role mode
t0m [Wed, 27 May 2009 23:45:09 +0000 (00:45 +0100)]
t/07_dynamiccontrollers_interface.t [new file with mode: 0644]
t/lib/ModelsFromConfigInterfaceApp.pm

diff --git a/t/07_dynamiccontrollers_interface.t b/t/07_dynamiccontrollers_interface.t
new file mode 100644 (file)
index 0000000..8e7e60a
--- /dev/null
@@ -0,0 +1,19 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
+use Test::More tests => 3;
+
+BEGIN { use_ok('ModelsFromConfigInterfaceApp'); }
+
+my $controller = ModelsFromConfigInterfaceApp->controller('One');
+ok $controller, 'Generated a controller';
+
+my $action = $controller->action_for('say_hello');
+ok $action, 'Got action reflected from model';
+
+# Actions we generate are still totally frigging useless, so lets not test
+# that here yet.
+
index 602a875..b6e898d 100644 (file)
@@ -4,6 +4,7 @@ use namespace::autoclean;
 
 use Catalyst qw/
     +CatalystX::DynamicComponent::ModelsFromConfig::InterfaceRoles
+    +CatalystX::DynamicComponent::ModelToControllerReflector
 /;
 
 extends 'Catalyst';