Permalink
Browse files

Added tests for individual phases of the process.

  • Loading branch information...
1 parent ae8098c commit 886c6c44d77b7b02b07f9631d6580bb728c87187 @davorg committed Aug 22, 2010
Showing with 22 additions and 0 deletions.
  1. +1 −0 MANIFEST
  2. +21 −0 t/02_phases.t
View
@@ -17,6 +17,7 @@ Makefile.PL
MANIFEST This list of files
META.yml
t/01_basic.t
+t/02_phases.t
t/03_noconf.t
t/05_cache.t
t/pod.t
View
@@ -0,0 +1,21 @@
+use Test::More tests => 9;
+use FindBin qw($Bin);
+use_ok('Perlanet::Simple');
+
+chdir $Bin;
+ok(my $p = Perlanet::Simple->new_with_config(configfile => 'testrc'),
+ 'Object created');
+isa_ok($p, 'Perlanet');
+
+is(@{$p->feeds}, 1, 'One feed');
+my @feeds = $p->fetch_feeds(@{$p->feeds});
+is(@feeds, 1, 'One fetchable feed');
+my @selected = $p->select_entries(@feeds);
+is(@selected, 1, 'One selected entry');
+my @sorted = $p->sort_entries(@selected);
+is(@sorted, 1, 'One sorted entry');
+my @cleaned = $p->clean_entries(@sorted);
+is(@cleaned, 1, 'One cleaned entry');
+my $feed = $p->build_feed(@cleaned);
+isa_ok($feed, 'Perlanet::Feed', 'Got a feed');
+

0 comments on commit 886c6c4

Please sign in to comment.