From: Graham Knop Date: Mon, 15 Jul 2013 03:47:03 +0000 (-0400) Subject: clean up test and remove subtests X-Git-Tag: v1.003000~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=904c916023b57856d29c15bf79ad1fe7c92f94a7;p=gitmo%2FMoo.git clean up test and remove subtests --- diff --git a/Makefile.PL b/Makefile.PL index 63c2790..39028dd 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,7 +13,7 @@ my %CONFIGURE_DEPS = ( my %BUILD_DEPS = (); my %TEST_DEPS = ( - 'Test::More' => 0.96, + 'Test::More' => 0.94, 'Test::Fatal' => 0.003, ); diff --git a/xt/moo-object-meta-can.t b/xt/moo-object-meta-can.t index 3bc4f21..e8d245f 100644 --- a/xt/moo-object-meta-can.t +++ b/xt/moo-object-meta-can.t @@ -1,6 +1,4 @@ -#!/usr/bin/env perl -use strict; -use warnings; +use strictures 1; use Test::More; use Test::Fatal; use Moo::Object; @@ -33,13 +31,13 @@ is( exception { Example->meta->can('can') } , undef, "Example->meta->can doesn't use base "Example_2"; } -ok( Example_2->can('meta'), 'Example_2 can meta') and subtest meta_checks_for_Example_2 => sub { +ok( Example_2->can('meta'), 'Example_2 can meta') and do { return unless ok( Example_2->meta->can('get_all_attributes'), 'Example_2 meta can get_all_attributes' ); my (@attributes) = Example_2->meta->get_all_attributes; is( scalar @attributes, 1, 'Has one attribute' ); }; -ok( Example_3->can('meta'), 'Example_3 can meta') and subtest meta_checks_for_Example_3 => sub { +ok( Example_3->can('meta'), 'Example_3 can meta') and do { return unless is( exception { Example_3->meta->can('can') } , undef, "Example_3->meta->can doesn't explode" ); return unless ok( Example_3->meta->can('get_all_attributes'), 'Example_3 meta can get_all_attributes' ); my (@attributes) = Example_3->meta->get_all_attributes;