root/trunk/plagger/t/plugins/Subscription-XPath/subscription.t

Revision 1413 (checked in by miyagawa, 14 years ago)

add deps and test_plugin_deps to Subscription::*

Line 
1 use strict;
2 use t::TestPlagger;
3
4 test_plugin_deps;
5 plan tests => 1;
6 run_eval_expected;
7
8 __END__
9
10 === test file
11 --- input config
12 plugins:
13   - module: Subscription::XPath
14     config:
15       url: file://$t::TestPlagger::BaseDirURI/t/samples/xoxo.html
16       xpath: //ul[@class="xoxo" or @class="subscriptionlist"]//a
17   - module: Aggregator::Null
18 --- expected
19 my @feeds = map $_->url, $context->subscription->feeds;
20 is_deeply(
21     \@feeds,
22     [ 'http://blog.bulknews.net/mt/',
23       'http://bulknews.typepad.com/',
24       'http://subtech.g.hatena.ne.jp/miyagawa/']
25 );
Note: See TracBrowser for help on using the browser.