Acme-MetaSyntactic-daleks

 view release on metacpan or  search on metacpan

t/ams-90up2date.t  view on Meta::CPAN

        unless $ENV{AMS_REMOTE};

    # need LWP
    eval { require LWP::Simple; };
    skip "LWP::Simple required for testing up-to-dateness", $tests if $@;

    # need the network too
    skip "Network looks down - couldn't reach Google", $tests
        unless LWP::Simple::get( 'http://www.google.com/intl/en/' );

    # need Test::Differences
    eval { require Test::Differences; };
    my $has_test_diff = $@ eq '';

    # a little warning
    diag "Testing @{[scalar @themes]} themes using the network (may take a while)";

    # compare each theme data with the network
    for my $theme (@themes) {

    SKIP: {
            no warnings 'utf8';

t/ams-90up2date.t  view on Meta::CPAN

                    if @$online == 0;

                # count
                is( scalar @$current,
                    scalar @$online,
                    "$theme has @{[scalar @$online]} items"
                );

                # details
                if( $has_test_diff ) {
                    Test::Differences::eq_or_diff(
                        $current, $online,
                        "$theme is up to date",
                        { context => 1 }
                    );
                }
                else {
                    is_deeply( $current, $online, "$theme is up to date" );
                }
            }
        }



( run in 0.354 second using v1.01-cache-2.11-cpan-131fc08a04b )