From: Matt S Trout Date: Sat, 16 May 2009 16:28:27 +0000 (+0100) Subject: update tests for url attribute on post object X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=729587557eb509177f88660abb350ecbce3523d2;p=engit%2FIron-Munger.git update tests for url attribute on post object --- diff --git a/t/calculate.t b/t/calculate.t index a4edec5..4950e4b 100644 --- a/t/calculate.t +++ b/t/calculate.t @@ -23,7 +23,9 @@ sub named_eq ($test_name, $sub_name, $expected, @posts) { 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); } diff --git a/t/monger.t b/t/monger.t index 7c8c847..51044c8 100644 --- a/t/monger.t +++ b/t/monger.t @@ -10,7 +10,9 @@ BEGIN { } 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');