Convert from Module::Install to Dist::Zilla
[gitmo/MooseX-Types-Structured.git] / t / 04-combined.t
index 242d2b5..2d2389b 100644 (file)
@@ -1,8 +1,8 @@
 BEGIN {
-       use strict;
-       use warnings;
-       use Test::More tests=>9;
-       use Test::Exception;
+    use strict;
+    use warnings;
+    use Test::More tests=>9;
+    use Test::Exception;
 }
 
 {
@@ -10,9 +10,9 @@ BEGIN {
 
     use Moose;
     use MooseX::Types::Structured qw(Dict Tuple);
-       use MooseX::Types::Moose qw(Int Str Object ArrayRef HashRef Maybe);
-        
-       has 'dict_with_tuple' => (is=>'rw', isa=>Dict[key1=>Str, key2=>Tuple[Int,Str]]);
+    use MooseX::Types::Moose qw(Int Str Object ArrayRef HashRef Maybe);
+
+    has 'dict_with_tuple' => (is=>'rw', isa=>Dict[key1=>Str, key2=>Tuple[Int,Str]]);
     has 'dict_with_tuple_with_union' => (is=>'rw', isa=>Dict[key1=>Str|Object, key2=>Tuple[Int,Str|Object]] );
 }
 
@@ -20,10 +20,10 @@ BEGIN {
 
 ok my $record = Test::MooseX::Meta::TypeConstraint::Structured::Combined->new
  => 'Instantiated new Record test class.';
+
 isa_ok $record => 'Test::MooseX::Meta::TypeConstraint::Structured::Combined'
  => 'Created correct object type.';
+
 ## Test dict_with_tuple
 
 lives_ok sub {
@@ -34,7 +34,7 @@ throws_ok sub {
     $record->dict_with_tuple({key1=>'Hello', key2=>['World',2]});
 }, qr/Attribute \(dict_with_tuple\) does not pass the type constraint/
  => 'Threw error on bad constraint';
+
 ## Test dict_with_tuple_with_union: Dict[key1=>'Str|Object', key2=>Tuple['Int','Str|Object']]
 
 lives_ok sub {
@@ -45,7 +45,7 @@ throws_ok sub {
     $record->dict_with_tuple_with_union({key1=>'Hello', key2=>['World',2]});
 }, qr/Attribute \(dict_with_tuple_with_union\) does not pass the type constraint/
  => 'Threw error on bad constraint';
+
 lives_ok sub {
     $record->dict_with_tuple_with_union({key1=>$record, key2=>[1,'World']});
 } => 'Set tuple attribute without error';