sub case ($name_spec, $case, $expect) {
my $name = join(' ', map ucfirst, split '_', $name_spec);
- my @posts = map { IronMunger::Post->new(at => $_->days->ago) } @$case;
+ my @posts = map {
+ IronMunger::Post->new(url => 'http://localhost', at => $_->days->ago)
+ } @$case;
foreach my $test (sort keys %$expect) {
named_eq($name, $test, $expect->{$test}, @posts);
}
}
my $monger = Monger->new(
- posts => [ map { Post->new(at => $_->days->ago) } (2, 10) ]
+ posts => [
+ map { Post->new(url => 'http://localhost', at => $_->days->ago) } (2, 10)
+ ]
);
cmp_ok($monger->days_left, '==', 8, 'Eight days to post');