use strict; use warnings; use Test::More; use Test::Deep; plan qw/no_plan/; use Directory::Scratch; my $scratch = Directory::Scratch->new; my $base = $scratch->base; sub file { return $base->file(@_) } use JS::YUI::Loader; my $loader = JS::YUI::Loader->new_from_yui_host; $loader->include->yuitest->reset->fonts->base; is($loader->html."\n", <<_END_); _END_ SKIP: { $ENV{TEST_YUI_HOST} or skip "Not testing going out to the yui host"; my $loader = JS::YUI::Loader->new_from_yui_host(cache => { uri => "http://example.com/assets", dir => $base->subdir("htdocs/assets") }); $loader->include->yuitest->reset->fonts->base; is($loader->html."\n", <<_END_); _END_ ok(-s $base->file(qw/htdocs assets reset.css/)); ok(-s $base->file(qw/htdocs assets yuitest.js/)); }