1use strict; 2use warnings; 3use Dancer2; 4use Test::More (); 5 6my @routes = get '/' => sub {1}; 7Test::More::is( scalar @routes, 2, 'Two routes available' ); 8foreach my $route (@routes) { 9 Test::More::isa_ok( $route, 'Dancer2::Core::Route' ); 10} 11 12Test::More::is( $routes[0]->method, 'get', 'Created GET route' ); 13Test::More::is( $routes[1]->method, 'head', 'Created HEAD route too' ); 14 15Test::More::done_testing; 16