use strict; use Test::Base; use Web::Scraper; plan tests => 1 * blocks; filters { selector => 'chomp', expected => 'yaml', }; run { my $block = shift; my $s = scraper { process $block->selector, 'text[]' => 'TEXT'; result 'text'; }; my $texts = $s->scrape($block->html); is_deeply $texts, $block->expected, $block->name; }; __DATA__ === --- html --- selector li.foo --- expected - bar1 - bar3