Catalyst-Plugin-Assets
view release on metacpan or search on metacpan
t/011-configuration-minify-yuicompressor.t view on Meta::CPAN
#!perl -w
BEGIN {
use Test::More;
plan skip_all => 'install ./yuicompressor.jar to enable this test' and exit unless -e "./yuicompressor.jar"
}
use strict;
use warnings;
use Test::More qw/no_plan/;
use t::Test;
use Catalyst::Test qw/t::TestCatalystMinifyYUICompressor/;
my $scratch = t::TestCatalystMinifyYUICompressor->scratch;
my $response;
ok($response = request('http://localhost/'));
ok($response = request('http://localhost/fruit-salad'));
compare($response->content, qw(
http://localhost/assets.css
http://localhost/assets.js
));
is($scratch->read("root/assets.css"), "div.auto{font-weight:bold;color:green;}div.apple{color:red;}div.apple{color:blue;}");
is($scratch->read("root/assets.js"), 'function calculate(){return 1*30/23}var auto=8+4;alert("Automatically "+auto);var apple=1+4;alert("Apple is "+apple)')
( run in 1.557 second using v1.01-cache-2.11-cpan-d8267643d1d )