X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F005_basic_list.t;h=8a90719cf1824bcc8a555101aa4e52699cd38572;hb=ea986fe84b749e9f61d87cb6249a62b5058d895f;hp=1c122dd6e026a32bcffce184d73fec77b1534fa4;hpb=40c302a98e41525880eda8774e78750c3610c106;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/t/005_basic_list.t b/t/005_basic_list.t index 1c122dd..8a90719 100644 --- a/t/005_basic_list.t +++ b/t/005_basic_list.t @@ -7,8 +7,7 @@ use Test::More; use Test::Exception; BEGIN { - plan skip_all => "DateTime required" unless eval { require DateTime }; - plan tests => 29; + plan tests => 28; } BEGIN { @@ -43,20 +42,6 @@ BEGIN { 'join' => {dashify => [ '-' ]} } ); - - has datetimes => ( - metaclass => 'Collection::List', - is => 'rw', - isa => 'ArrayRef[DateTime]', - curries => { - grep => { - times_with_day => sub { - my ($self, $body, $datetime) = @_; - $body->($self, sub { $_->ymd eq $datetime->ymd }); - }, - }, - }, - ); } my $stuff = Stuff->new(options => [ 1 .. 10 ]); @@ -107,17 +92,6 @@ is_deeply([ $stuff->up_by_one() ], [2 .. 11]); is($stuff->dashify, '1-2-3-4-5-6-7-8-9-10'); -$stuff->datetimes([ - DateTime->now->subtract(days => 1), - DateTime->now->subtract(days => 1), - DateTime->now, - DateTime->now, -]); - -my $my_time = DateTime->now; - -is($stuff->times_with_day($my_time), 2, 'check for currying with a coderef'); - ## test the meta my $options = $stuff->meta->get_attribute('_options');