/[Frey]/branches/zimbardo/t/01-Frey-Storage.t
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /branches/zimbardo/t/01-Frey-Storage.t

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1188 by dpavlin, Mon Sep 28 19:06:48 2009 UTC revision 1189 by dpavlin, Mon Sep 28 20:23:45 2009 UTC
# Line 2  Line 2 
2  use strict;  use strict;
3  use warnings;  use warnings;
4    
5  use Test::More tests => 13;  use Test::More tests => 21;
6  use lib 'lib';  use lib 'lib';
7    
8  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
# Line 27  isa_ok( Frey::Storage->meta, 'Moose::Met Line 27  isa_ok( Frey::Storage->meta, 'Moose::Met
27  ok( my $o = Mock->new( debug => $debug ), 'new' );  ok( my $o = Mock->new( debug => $debug ), 'new' );
28  diag $o->dump(2) if $debug;  diag $o->dump(2) if $debug;
29    
30    foreach my $path ( map { "var/t/Frey.Storage.$_" } ( 'yaml', 'storable' ) ) {
31    
32    diag $path;
33    
34  my $data = { foo => 'bar' };  my $data = { foo => 'bar' };
 my $path = 'var/t/Frey.Storeage.yaml';  
35    
36  ok( $o->store( $path, $data ), 'store' );  ok( $o->store( $path, $data ), 'store' );
37    
# Line 51  is_deeply( $data, $new, 'same' ); Line 54  is_deeply( $data, $new, 'same' );
54    
55  ok( ! $o->reload( $path ), 'no reload' );  ok( ! $o->reload( $path ), 'no reload' );
56    
57    } # foreach
58    
59  ok( ! $o->load( 'var/something.which.doesnt.exist' ), 'load without file' );  ok( ! $o->load( 'var/something.which.doesnt.exist' ), 'load without file' );

Legend:
Removed from v.1188  
changed lines
  Added in v.1189

  ViewVC Help
Powered by ViewVC 1.1.26