X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2Fcdbi%2F15-accessor.t;h=267916d86d89acc0cb8b5c746cd2d89827e8ab5c;hb=39568b8ae8bbe3cf6b6873ce87a8fd925a539d64;hp=b0b684cb5c4c42019f26f92484f2284aa502174c;hpb=6a3bf2519832866d037740c5fb22341dad6f8bb3;p=dbsrgits%2FDBIx-Class.git diff --git a/t/cdbi/15-accessor.t b/t/cdbi/15-accessor.t index b0b684c..267916d 100644 --- a/t/cdbi/15-accessor.t +++ b/t/cdbi/15-accessor.t @@ -1,16 +1,7 @@ use strict; +use warnings; use Test::More; -BEGIN { - eval "use DBIx::Class::CDBICompat;"; - if ($@) { - plan (skip_all => 'Class::Trigger and DBIx::ContextualFetch required'); - next; - } - eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 75); -} - INIT { #local $SIG{__WARN__} = #sub { like $_[0], qr/clashes with built-in method/, $_[0] }; @@ -99,13 +90,14 @@ eval { }; is $@, '', "No errors"; -TODO: { local $TODO = 'TODOifying failing tests, waiting for Schwern'; ok (1, 'remove me'); eval { my $data = { %$data }; $data->{NumExplodingSheep} = 3; ok my $bt = Film->find_or_create($data), "find_or_create Modified accessor - create with column name"; isa_ok $bt, "Film"; + + local $TODO = 'TODOifying failing tests, waiting for Schwern'; is $bt->sheep, 3, 'sheep bursting violently'; }; is $@, '', "No errors"; @@ -116,6 +108,8 @@ eval { ok my $bt = Film->find_or_create($data), "find_or_create Modified accessor - create with accessor"; isa_ok $bt, "Film"; + + local $TODO = 'TODOifying failing tests, waiting for Schwern'; is $bt->sheep, 4, 'sheep bursting violently'; }; is $@, '', "No errors"; @@ -124,8 +118,9 @@ eval { my @film = Film->search({ sheep => 1 }); is @film, 2, "Can search with modified accessor"; }; -is $@, '', "No errors"; - +{ + local $TODO = 'TODOifying failing tests, waiting for Schwern'; + is $@, '', "No errors"; } { @@ -268,3 +263,5 @@ is $@, '', "No errors"; $_->discard_changes for ($naked, $sandl); } + +done_testing;