importing Catalyst has special, magical effects. You really didn't want to do that...
t0m [Sun, 12 Jul 2009 23:48:12 +0000 (00:48 +0100)]
lib/Catalyst/Action/REST.pm
t/isa.t [new file with mode: 0644]

index 0b55263..edef056 100644 (file)
@@ -12,7 +12,6 @@ use warnings;
 
 use base 'Catalyst::Action';
 use Class::Inspector;
-use Catalyst;
 use Catalyst::Request::REST;
 use Catalyst::Controller::REST;
 
diff --git a/t/isa.t b/t/isa.t
new file mode 100644 (file)
index 0000000..14e3343
--- /dev/null
+++ b/t/isa.t
@@ -0,0 +1,20 @@
+use strict;
+use warnings;
+
+use FindBin qw/$Bin/;
+use lib "$Bin/lib";
+
+use Test::More tests => 5;
+
+use Test::Catalyst::Action::REST;
+
+my $controller = Test::Catalyst::Action::REST->controller('Root');
+ok $controller;
+
+my $action = $controller->action_for('test');
+ok $action;
+
+isa_ok($action, 'Catalyst::Action::REST');
+ok(!$action->isa('Catalyst'));
+ok(!$action->isa('Catalyst::Controller'));
+