Skip to content
This repository
Browse code

Added tests for individual phases of the process.

  • Loading branch information...
commit 886c6c44d77b7b02b07f9631d6580bb728c87187 1 parent ae8098c
Dave Cross authored August 22, 2010

Showing 2 changed files with 22 additions and 0 deletions. Show diff stats Hide diff stats

  1. 1  MANIFEST
  2. 21  t/02_phases.t
1  MANIFEST
@@ -17,6 +17,7 @@ Makefile.PL
17 17
 MANIFEST			This list of files
18 18
 META.yml
19 19
 t/01_basic.t
  20
+t/02_phases.t
20 21
 t/03_noconf.t
21 22
 t/05_cache.t
22 23
 t/pod.t
21  t/02_phases.t
... ...
@@ -0,0 +1,21 @@
  1
+use Test::More tests => 9;
  2
+use FindBin qw($Bin);
  3
+use_ok('Perlanet::Simple');
  4
+
  5
+chdir $Bin;
  6
+ok(my $p = Perlanet::Simple->new_with_config(configfile => 'testrc'),
  7
+   'Object created');
  8
+isa_ok($p, 'Perlanet');
  9
+
  10
+is(@{$p->feeds}, 1, 'One feed');
  11
+my @feeds = $p->fetch_feeds(@{$p->feeds});
  12
+is(@feeds, 1, 'One fetchable feed');
  13
+my @selected = $p->select_entries(@feeds);
  14
+is(@selected, 1, 'One selected entry');
  15
+my @sorted = $p->sort_entries(@selected);
  16
+is(@sorted, 1, 'One sorted entry');
  17
+my @cleaned = $p->clean_entries(@sorted);
  18
+is(@cleaned, 1, 'One cleaned entry');
  19
+my $feed = $p->build_feed(@cleaned);
  20
+isa_ok($feed, 'Perlanet::Feed', 'Got a feed');
  21
+

0 notes on commit 886c6c4

Please sign in to comment.
Something went wrong with that request. Please try again.