Skip to content

Commit

Permalink
Added tests for individual phases of the process.
Browse files Browse the repository at this point in the history
  • Loading branch information
davorg committed Aug 22, 2010
1 parent ae8098c commit 886c6c4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
21 changes: 21 additions & 0 deletions t/02_phases.t
Original file line number Diff line number Diff line change
@@ -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.