use Test::Most tests => 1, 'die'; BEGIN { $ENV{'DANCER_ENVIRONMENT'} = 'testing'; } package TestApp; use Dancer2; use Dancer2::Plugin::Menu; use Data::Dumper qw 'Dumper'; get '/' => sub { return 'hello' }; get '/test' => sub { return 'hi' }; # do_stuff method gets called, but no object is passed to it so function won't work properly deep_cmp [ '/', '/test' ], Dancer2::Plugin::Menu::do_stuff, 'returns expected array';