work in progress, tests are failing, and parameterized role is not flexible enough...
[gitmo/MooseX-Getopt.git] / t / 004_nogetop.t
index b0fa16d..4cc272f 100644 (file)
@@ -4,21 +4,20 @@ use strict;
 use warnings;
 
 use Test::More tests => 9;
-use Test::Exception;
+use Test::Fatal 0.003;
 
 BEGIN {
     use_ok('MooseX::Getopt');
 }
 
 {
-
     package App;
     use Moose;
 
-    with 'MooseX::Getopt';
+    with 'MooseX::Getopt' => { getopt_conf => [] };
 
     has 'data' => (
-        metaclass => 'MooseX::Getopt::Meta::Attribute',
+        metaclass => 'Getopt',
         is        => 'ro',
         isa       => 'Str',
         default   => 'file.dat',
@@ -34,7 +33,7 @@ BEGIN {
     );
 
     has 'horse' => (
-        metaclass   => 'MooseX::Getopt::Meta::Attribute',
+        metaclass   => 'Getopt',
         is          => 'ro',
         isa         => 'Str',
         default     => 'bray',
@@ -66,14 +65,14 @@ BEGIN {
     );
 
     has 'private_stuff' => (
-        metaclass => 'MooseX::Getopt::Meta::NoGetopt',
+        metaclass => 'NoGetopt',
         is       => 'ro',
         isa      => 'Int',
         default  => 713
     );
 
     has '_private_stuff_cmdline' => (
-        metaclass => 'MooseX::Getopt::Meta::Attribute',
+        metaclass => 'Getopt',
         is        => 'ro',
         isa       => 'Int',
         default   => 832,
@@ -99,5 +98,5 @@ BEGIN {
 {
     local @ARGV = (qw/--private_stuff 317/);
 
-    throws_ok { App->new_with_options } qr/Unknown option: private_stuff/;
+    like exception { App->new_with_options }, qr/Unknown option: private_stuff/;
 }