/[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 287 by dpavlin, Wed Nov 5 08:20:59 2008 UTC revision 467 by dpavlin, Wed Nov 19 19:28:09 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 => 4;  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::View::Dumper' }
13    
14  BEGIN {  BEGIN {
15          use_ok('Frey::Dumper');          use_ok( class );
16            use_ok('Frey::ClassLoader');
17  }  }
18    
19  ok( my $o = Frey::Dumper->new( data => { foo => 'bar' } ), 'new' );  my $param = {
20  ok( my $markup = $o->markup, 'markup' );          debug => $debug,
21            data => { foo => 'bar' },
22    };
23    
24    ok( my $o = Frey::ClassLoader->new_frey_class( class, $param ), 'new' );
25    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, $param->{data}, 'as_data' );
29    

Legend:
Removed from v.287  
changed lines
  Added in v.467

  ViewVC Help
Powered by ViewVC 1.1.26