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

Contents of /trunk/t/02-frey-ppi.t

Parent Directory Parent Directory | Revision Log Revision Log


Revision 915 - (show annotations)
Sun Jan 4 23:05:59 2009 UTC (15 years, 3 months ago) by dpavlin
File MIME type: application/x-troff
File size: 1070 byte(s)
use XML::FeedPP istead of Data::Feed
1 #!/usr/bin/perl
2 use strict;
3 use warnings;
4
5 my $debug = @ARGV ? 1 : 0;
6
7 use Test::More tests => 15;
8 use lib 'lib';
9
10 use Data::Dump qw/dump/;
11
12 BEGIN {
13 use_ok('Frey::PPI');
14 }
15
16 my $test = {
17 'Frey::DelIcioUs' => {
18 attribute_order => ["username", "password"],
19 includes => {
20 "use" => ["Moose", "LWP::UserAgent", "XML::Simple", "Data::Dump"],
21 },
22 },
23 'Frey::Feed' => {
24 attribute_order => ["uri", "feed", "title"],
25 includes => {
26 "use" => [ "Moose", "Frey::Types", "Frey::Mirror", "XML::FeedPP", "Data::Dump" ],
27 },
28 has_tests => ["t/06-Frey-Feed.t"],
29 },
30 };
31
32 foreach my $class ( keys %$test ) {
33
34 ok( my $o = Frey::PPI->new( class => $class, debug => $debug ), "new $class" );
35
36 my $data;
37
38 ok( $data->{attribute_order} = $o->attribute_order, 'attribute_order' );
39 ok( $data->{includes} = $o->includes, 'includes' );
40 $data->{has_tests} = $o->has_tests;
41 diag "data $class = ",dump( $data ) if $debug;
42
43 foreach ( keys %$data ) {
44 is_deeply( $data->{$_}, $test->{$class}->{$_}, $_ );
45 }
46
47 ok( $data = $o->as_data, 'data' );
48 diag dump( $data ) if $debug;
49
50 }

Properties

Name Value
svn:executable *

  ViewVC Help
Powered by ViewVC 1.1.26