00_test_function_domain.t 342 B

123456789101112
  1. #!/usr/bin/env perl
  2. use Scrappy;
  3. use FindBin;
  4. use Test::More $ENV{TEST_LIVE} ?
  5. (tests => 2) : (skip_all => 'env var TEST_LIVE not set, live testing is not enabled');
  6. my $s = Scrappy->new;
  7. $s->get("http://www.perl.org/");
  8. ok $s->domain eq 'www.perl.org';
  9. $s->get("http://search.cpan.org/");
  10. ok $s->domain eq 'search.cpan.org';