1 use DBIx::Class::Schema::Loader::Optional::Dependencies
2 -skip_all_without => 'test_dbicdump_config';
8 use File::Path qw/make_path rmtree/;
9 use DBIx::Class::Schema::Loader::Utils 'slurp_file';
13 use make_dbictest_db ();
14 use dbixcsl_test_dir '$tdir';
18 my $config_dir = "$tdir/dbicdump_config";
19 make_path $config_dir;
20 my $config_file = "$config_dir/my.conf";
22 my $dump_path = "$tdir/dbicdump_config_dump";
24 open my $fh, '>', $config_file
25 or die "Could not write to $config_file: $!";
28 schema_class DBICTest::Schema
33 dsn $make_dbictest_db::dsn
37 dump_directory $dump_path
38 components InflateColumn::DateTime
39 schema_base_class TestSchemaBaseClass
46 system $^X, 'script/dbicdump', $config_file;
49 'dbicdump executed successfully';
51 my $foo = try { slurp_file "$dump_path/DBICTest/Schema/Result/Foo.pm" } || '';
53 like $foo, qr/InflateColumn::DateTime/,
54 'loader options read correctly from config_file';
59 rmtree($config_dir, 1, 1);
60 rmtree($dump_path, 1, 1);