/[Frey]/trunk/t/05-frey-dumper.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 /trunk/t/05-frey-dumper.t

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

revision 463 by dpavlin, Wed Nov 19 15:28:23 2008 UTC revision 464 by dpavlin, Wed Nov 19 18:55:19 2008 UTC
# Line 4  use warnings; Line 4  use warnings;
4    
5  my $debug = @ARGV ? 1 : 0;  my $debug = @ARGV ? 1 : 0;
6    
7  use Test::More tests => 5;  use Test::More tests => 6;
8  use lib 'lib';  use lib 'lib';
9    
10  use Data::Dump qw/dump/;  use Data::Dump qw/dump/;
11    
12    sub class { 'Frey::Dumper' }
13    
14  BEGIN {  BEGIN {
15          use_ok('Frey::Dumper');          use_ok( class );
16            use_ok('Frey::ClassLoader');
17  }  }
18    
19  my $data = { foo => 'bar' };  my $param = {
20            debug => $debug,
21            data => { foo => 'bar' },
22    };
23    
24  ok( my $o = Frey::Dumper->new( data => $data ), 'new' );  ok( my $o = Frey::ClassLoader->new_frey_class( class, $param ), 'new' );
25  ok( my $markup = $o->as_markup, 'markup' );  ok( my $markup = $o->as_markup, 'markup' );
26  diag $markup if $debug;  diag $markup if $debug;
27  like( $markup, qr/foo.*bar/, 'correct' );  like( $markup, qr/foo.*bar/, 'correct' );
28  is_deeply( $o->as_data, $data, 'as_data' );  is_deeply( $o->as_data, $param->{data}, 'as_data' );
29    

Legend:
Removed from v.463  
changed lines
  Added in v.464

  ViewVC Help
Powered by ViewVC 1.1.26