From: Michael G Schwern Date: Thu, 6 Nov 2008 12:44:36 +0000 (+0000) Subject: A little indentation clean up X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48cb8be42936b4341650812d10fab92d5bd753dc;p=dbsrgits%2FDBIx-Class-Historic.git A little indentation clean up Test the result of an eval directly. discard the changes to $sandl to quiet an "object destroyed with changes" warning. --- diff --git a/t/cdbi-t/15-accessor.t b/t/cdbi-t/15-accessor.t index 3fea6e2..1f7a985 100644 --- a/t/cdbi-t/15-accessor.t +++ b/t/cdbi-t/15-accessor.t @@ -8,7 +8,7 @@ BEGIN { next; } eval "use DBD::SQLite"; - plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 54); + plan $@ ? (skip_all => 'needs DBD::SQLite for testing') : (tests => 55); } INIT { @@ -17,9 +17,11 @@ INIT { use lib 't/testlib'; require Film; require Actor; - require Director; + require Director; + Actor->has_a(film => 'Film'); - Film->has_a(director => 'Director'); + Film->has_a(director => 'Director'); + sub Class::DBI::sheep { ok 0; } } @@ -108,7 +110,7 @@ eval { my $bt = Film->create($data); my $ac = Actor->create($p_data); - eval { my $f = $ac->film }; + ok !eval { my $f = $ac->film; 1 }; like $@, qr/film/, "no hasa film"; eval { @@ -212,4 +214,6 @@ eval { like $@, qr/read only/, "And can't delete 4 Days in July"; my $abigail = eval { Film->create({ title => "Abigail's Party" }) }; like $@, qr/read only/, "Or create new films"; + + $sandl->discard_changes; }