X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F30_02bad_comment_table.t;h=bee64f9bf0222918d55b5641695636fc71488611;hb=a79e11896d6d1d70842c432cde8830ded06568ce;hp=94c14324b8ecf4b655ec74249dc0481c28ee456f;hpb=ea998e8ea908a2f10462740b568831737224a75e;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/30_02bad_comment_table.t b/t/30_02bad_comment_table.t index 94c1432..bee64f9 100644 --- a/t/30_02bad_comment_table.t +++ b/t/30_02bad_comment_table.t @@ -1,13 +1,14 @@ use strict; +use warnings; use Test::More; use Test::Exception; use Test::Warn; -use lib qw(t/lib); -use File::Slurp qw(slurp); +use DBIx::Class::Schema::Loader::Utils 'slurp_file'; use File::Path; +use Try::Tiny; +use lib qw(t/lib); use make_dbictest_db_bad_comment_tables; use dbixcsl_test_dir qw/$tdir/; -use Try::Tiny; my $dump_path = "$tdir/dump"; @@ -16,6 +17,7 @@ my $dump_path = "$tdir/dump"; use base qw/ DBIx::Class::Schema::Loader /; __PACKAGE__->loader_options( dump_directory => $dump_path, + quiet => 1, ); } @@ -25,8 +27,8 @@ try { plan tests => 1; -my $foo = try { slurp("$dump_path/DBICTest/Schema/1/Result/Foo.pm") }; -my $bar = try { slurp("$dump_path/DBICTest/Schema/1/Result/Bar.pm") }; +my $foo = try { slurp_file("$dump_path/DBICTest/Schema/1/Result/Foo.pm") }; +my $bar = try { slurp_file("$dump_path/DBICTest/Schema/1/Result/Bar.pm") }; like($foo, qr/Result::Foo\n/, 'No error from invalid comment tables');