| 1 |
use strict; |
| 2 |
use warnings; |
| 3 |
use Test::More; |
| 4 |
use Test::Fatal; |
| 5 |
BEGIN { use_ok('Dancer2::Core::Route') } |
| 6 |
|
| 7 |
like( exception { |
| 8 |
Dancer2::Core::Route->new( |
| 9 |
regexp => '/:splat', |
| 10 |
code => sub {1}, |
| 11 |
method => 'get', |
| 12 |
); |
| 13 |
}, |
| 14 |
qr{^Named placeholder 'splat' is deprecated}, |
| 15 |
'Find deprecation of :splat' |
| 16 |
); |
| 17 |
|
| 18 |
like( exception { |
| 19 |
Dancer2::Core::Route->new( |
| 20 |
regexp => '/:captures', |
| 21 |
code => sub {1}, |
| 22 |
method => 'get', |
| 23 |
); |
| 24 |
}, |
| 25 |
qr{^Named placeholder 'captures' is deprecated}, |
| 26 |
'Find deprecation of :captures', |
| 27 |
); |
| 28 |
|
| 29 |
done_testing; |