-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added tests for individual phases of the process.
- Loading branch information
Showing
2 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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'); | ||
|