use_ok stinks; just load the library
[gitmo/Moose-Autobox.git] / t / 003_p6_example.t
index 054f966..b9963f6 100644 (file)
@@ -3,12 +3,10 @@
 use strict;
 use warnings;
 
-use Test::More tests => 8;
+use Test::More tests => 7;
 use Test::Exception;
 
-BEGIN {
-    use_ok('Moose::Autobox');
-}
+require Moose::Autobox;
 
 =pod
 
@@ -37,11 +35,7 @@ This comes from one of the examples in the Pugs distro.
     }
 }
 
-{
-    package Moose::Autobox::SCALAR;
-    use Moose 'with';
-    with 'Units::Bytes';
-}
+Moose::Autobox->mixin_additional_role(SCALAR => 'Units::Bytes');
 
 sub testing_bytes {
     ::dies_ok { 10->bytes } '... cannot do the autoboxing lexically';