root/trunk/plagger/t/plugins/Publish-Serializer/base.t

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

Added Publish::Serializer via http://naoya.g.hatena.ne.jp/naoya/20060315/1142433649

Line 
1 use strict;
2 use t::TestPlagger;
3
4 our $url    = "file://$t::TestPlagger::BaseDirURI/t/samples/rss-full.xml";
5 our $output = $FindBin::Bin . "/" . Digest::MD5::md5_hex($url) . ".yaml";
6
7 test_requires('YAML::Syck');
8 test_plugin_deps;
9 plan 'no_plan';
10 run_eval_expected;
11
12 END {
13     unlink $output if $output && -e $output;
14 }
15
16 __END__
17
18 === Save with YAML
19 --- input config
20 plugins:
21   - module: Subscription::Config
22     config:
23       feed:
24         - $main::url
25   - module: Publish::Serializer
26     config:
27       dir: $FindBin::Bin
28       serializer: YAML
29       filename: %i.yaml
30 --- expected
31 use YAML::Syck;
32 my $data = YAML::Syck::LoadFile($main::output);
33 ok $data;
34 is $data->{title}, 'Bulknews::Subtech';
Note: See TracBrowser for help on using the browser.