added failing todo test for empty dispatch prototype
Christian Walde [Tue, 4 Oct 2011 20:12:04 +0000 (22:12 +0200)]
t/dispatch_parser.t

index b42bb61..d0b8db4 100644 (file)
@@ -7,6 +7,27 @@ use Web::Dispatch::Parser;
 
 my $dp = Web::Dispatch::Parser->new;
 
+TODO: {
+   local $TODO = 'according to the synopsis this should work';
+   my $all = eval {
+     $dp->parse('');
+   };
+   ok $all;
+   eval {
+     is_deeply(
+       [ $all->({ REQUEST_METHOD => 'GET' }) ],
+       [ {} ],
+       'GET matches'
+     );
+
+     is_deeply(
+       [ $all->({ REQUEST_METHOD => 'POST' }) ],
+       [ {} ],
+       'POST matches'
+     );
+   };
+};
+
 {
    my $get = $dp->parse('GET');