X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=blobdiff_plain;f=t%2Fstorage%2Fexception.t;h=d96e336cfa23b812f1eefbb8d9c4bfd4c98fb573;hp=9a14af3be644854b4efa5e4f1f321afaa0b92f81;hb=3b80fa31b60050d4c8df91457ba6fd51b579a7a6;hpb=87bf71d54c0e5bd50700d8e3be59b79e9b670012 diff --git a/t/storage/exception.t b/t/storage/exception.t index 9a14af3..d96e336 100644 --- a/t/storage/exception.t +++ b/t/storage/exception.t @@ -19,6 +19,7 @@ use DBICTest::Schema; sub _populate_dbh { my $self = shift; + my $death = $self->_dbi_connect_info->[3]{die}; die "storage test died: $death" if $death eq 'before_populate'; @@ -30,12 +31,12 @@ use DBICTest::Schema; } for (qw/before_populate after_populate/) { - dies_ok (sub { + throws_ok (sub { my $schema = DBICTest::Schema->clone; $schema->storage_type ('Dying::Storage'); $schema->connection (DBICTest->_database, { die => $_ }); $schema->storage->ensure_connected; - }, "$_ exception found"); + }, qr/$_/, "$_ exception found"); } done_testing;