From: Alexander Hartmaier Date: Fri, 18 Dec 2009 13:40:32 +0000 (+0000) Subject: use Test::Exception X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8fd1068349424024f8c455b087fa75e654abac3f;p=dbsrgits%2FDBIx-Class-Historic.git use Test::Exception --- diff --git a/t/99dbic_sqlt_parser.t b/t/99dbic_sqlt_parser.t index f795905..da56fd5 100644 --- a/t/99dbic_sqlt_parser.t +++ b/t/99dbic_sqlt_parser.t @@ -2,6 +2,7 @@ use strict; use warnings; use Test::More; +use Test::Exception; use lib qw(t/lib); use DBICTest; @@ -81,7 +82,10 @@ my @sources = grep eval { my $sqlt_schema = create_schema({ schema => $schema_invalid_view }); }; - like($@, qr/view noviewdefinition is missing a view_definition/, "parser detects views with a view_definition"); + #like($@, qr/view noviewdefinition is missing a view_definition/, "parser detects views with a view_definition"); + throws_ok { create_schema({ schema => $schema_invalid_view }) } + qr/view noviewdefinition is missing a view_definition/, + 'parser detects views with a view_definition'; # my @views = $sqlt_schema->get_views; #