make all warnings fatal in tests
[gitmo/MooseX-Getopt.git] / t / 107_union_bug.t
index 1dcba21..653f012 100644 (file)
@@ -1,9 +1,8 @@
-#!/usr/bin/perl
-
 use strict;
-use warnings;
+use warnings FATAL => 'all';
 
-use Test::Most tests => 5;
+use Test::More tests => 6;
+use Test::NoWarnings 1.04 ':early';
 
 {
     package example;
@@ -49,8 +48,7 @@ use Test::Most tests => 5;
         other   => 'test',
     });
     isa_ok($example, 'example');
-    explain($example->results);
-    cmp_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
+    is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
 }
 
 # With MooseX::Getopt
@@ -59,7 +57,7 @@ use Test::Most tests => 5;
     my $example = example->new_with_options;
     isa_ok($example, 'example');
 
-    explain($example->results);
     is($example->other,'test');
-    cmp_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
+    is_deeply($example->results, [qw(1234 5678 9012)], 'result as expected');
 }
+