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';
12 use make_dbictest_db ();
13 use dbixcsl_test_dir '$tdir';
17 my $config_dir = "$tdir/dbicdump_config";
18 make_path $config_dir;
19 my $config_file = "$config_dir/my.conf";
21 my $dump_path = "$tdir/dbicdump_config_dump";
23 open my $fh, '>', $config_file
24 or die "Could not write to $config_file: $!";
27 schema_class DBICTest::Schema
32 dsn $make_dbictest_db::dsn
36 dump_directory $dump_path
37 components InflateColumn::DateTime
38 schema_base_class TestSchemaBaseClass
45 system $^X, 'script/dbicdump', $config_file;
48 'dbicdump executed successfully';
50 my $foo = try { slurp_file "$dump_path/DBICTest/Schema/Result/Foo.pm" } || '';
52 like $foo, qr/InflateColumn::DateTime/,
53 'loader options read correctly from config_file';
58 rmtree($config_dir, 1, 1);
59 rmtree($dump_path, 1, 1);