X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F100_gld_default_bug.t;h=85e10e3c59973f92edf00735762fc78a61e2ff5b;hb=195fb408a61ad34e0e41887b4f9f8dc384dd5da5;hp=29ae2a423ac22b4c6bbd0d9fa84164a427cc2f5c;hpb=2557b52647dda5b9e090b324d950d4a55db74bae;p=gitmo%2FMooseX-Getopt.git diff --git a/t/100_gld_default_bug.t b/t/100_gld_default_bug.t index 29ae2a4..85e10e3 100644 --- a/t/100_gld_default_bug.t +++ b/t/100_gld_default_bug.t @@ -1,17 +1,14 @@ -#!/usr/bin/perl - use strict; use warnings; -use Test::More; -use Test::Exception; +use Test::More tests => 6; +use Test::NoWarnings 1.04 ':early'; -BEGIN { - eval 'use Getopt::Long::Descriptive;'; - plan skip_all => "Getopt::Long::Descriptive required for this test" if $@; - plan tests => 5; - use_ok('MooseX::Getopt'); -} +use Test::Requires { + 'Getopt::Long::Descriptive' => 0.01, # skip all if not installed +}; + +use_ok('MooseX::Getopt'); { package Engine::Foo; @@ -20,7 +17,7 @@ BEGIN { with 'MooseX::Getopt'; has 'nproc' => ( - metaclass => 'Getopt', + traits => ['Getopt'], is => 'ro', isa => 'Int', default => sub { 1 },