make this test function properly when JSON backends aren't installed
[gitmo/MooseX-Storage.git] / t / 003_basic_w_embedded_objects.t
index ccc7e14..03ef4af 100644 (file)
@@ -1,5 +1,3 @@
-#!/usr/bin/perl
-
 use strict;
 use warnings;
 
@@ -12,8 +10,8 @@ BEGIN {
 
 =pod
 
-This test checks the single level 
-expansion and collpasing of the 
+This test checks the single level
+expansion and collpasing of the
 ArrayRef and HashRef type handlers.
 
 =cut
@@ -24,30 +22,30 @@ ArrayRef and HashRef type handlers.
     use MooseX::Storage;
 
     with Storage;
-    
+
     has 'number' => (is => 'ro', isa => 'Int');
-    
+
     package Foo;
     use Moose;
     use MooseX::Storage;
 
-    with Storage;    
+    with Storage;
 
-    has 'bars' => ( 
-        is  => 'ro', 
-        isa => 'ArrayRef' 
+    has 'bars' => (
+        is  => 'ro',
+        isa => 'ArrayRef'
     );
-    
+
     package Baz;
     use Moose;
     use MooseX::Storage;
 
-    with Storage;    
+    with Storage;
 
-    has 'bars' => ( 
-        is  => 'ro', 
-        isa => 'HashRef' 
-    );    
+    has 'bars' => (
+        is  => 'ro',
+        isa => 'HashRef'
+    );
 }
 
 {
@@ -55,19 +53,19 @@ ArrayRef and HashRef type handlers.
         bars => [ map { Bar->new(number => $_) } (1 .. 10) ]
     );
     isa_ok( $foo, 'Foo' );
-    
+
     cmp_deeply(
         $foo->pack,
         {
             __CLASS__ => 'Foo',
-            bars      => [ 
+            bars      => [
                 map {
                   {
                       __CLASS__ => 'Bar',
                       number    => $_,
-                  }  
+                  }
                 } (1 .. 10)
-            ],           
+            ],
         },
         '... got the right frozen class'
     );
@@ -77,15 +75,15 @@ ArrayRef and HashRef type handlers.
     my $foo = Foo->unpack(
         {
             __CLASS__ => 'Foo',
-            bars      => [ 
+            bars      => [
                 map {
                   {
                       __CLASS__ => 'Bar',
                       number    => $_,
-                  }  
+                  }
                 } (1 .. 10)
-            ],           
-        }      
+            ],
+        }
     );
     isa_ok( $foo, 'Foo' );
 
@@ -101,7 +99,7 @@ ArrayRef and HashRef type handlers.
         bars => { map { ($_ => Bar->new(number => $_)) } (1 .. 10) }
     );
     isa_ok( $baz, 'Baz' );
-    
+
     cmp_deeply(
         $baz->pack,
         {
@@ -111,9 +109,9 @@ ArrayRef and HashRef type handlers.
                   ($_ => {
                       __CLASS__ => 'Bar',
                       number    => $_,
-                  })  
+                  })
                 } (1 .. 10)
-            },           
+            },
         },
         '... got the right frozen class'
     );
@@ -128,10 +126,10 @@ ArrayRef and HashRef type handlers.
                   ($_ => {
                       __CLASS__ => 'Bar',
                       number    => $_,
-                  })  
+                  })
                 } (1 .. 10)
-            },           
-        }      
+            },
+        }
     );
     isa_ok( $baz, 'Baz' );