X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F30_03no_comment_table.t;h=6ce45ffd8231b01de800f8ee019b88d2e838763d;hb=4b5eca90f633645050d77e5d0c98d05a6cc37502;hp=8ef347356b56be79b074221f8ca1e034e747b3ce;hpb=5c06aa08ab17d9d0e8437a990b5717238deeb8fd;p=dbsrgits%2FDBIx-Class-Schema-Loader.git diff --git a/t/30_03no_comment_table.t b/t/30_03no_comment_table.t index 8ef3473..6ce45ff 100644 --- a/t/30_03no_comment_table.t +++ b/t/30_03no_comment_table.t @@ -1,10 +1,11 @@ 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 lib qw(t/lib); use make_dbictest_db; use dbixcsl_test_dir qw/$tdir/; @@ -15,6 +16,7 @@ my $dump_path = "$tdir/dump"; use base qw/ DBIx::Class::Schema::Loader /; __PACKAGE__->loader_options( dump_directory => $dump_path, + quiet => 1, ); } @@ -22,9 +24,9 @@ DBICTest::Schema::1->connect($make_dbictest_db::dsn); plan tests => 1; -my $foo = slurp("$dump_path/DBICTest/Schema/1/Result/Foo.pm"); -my $bar = slurp("$dump_path/DBICTest/Schema/1/Result/Bar.pm"); +my $foo = slurp_file("$dump_path/DBICTest/Schema/1/Result/Foo.pm"); +my $bar = slurp_file("$dump_path/DBICTest/Schema/1/Result/Bar.pm"); -like($foo, qr/Result::Foo\n/, 'No error from no comments'); +like($foo, qr/Result::Foo\n/, 'No error from lack of comment tables'); END { rmtree($dump_path, 1, 1); }