constraint => [ [ qr/my_schema/ => qr/foo|bar/ ] ],
exclude => [ [ qr/my_schema/ => qr/bar/ ] ],
},
+ generated_results => [qw(MySchema::Floop)],
warnings => [
qr/^db_schema is not supported on SQLite/,
],
options => {
use_namespaces => 1,
},
+ generated_results => [qw(Foo Bar)],
regexes => {
'Result/Foo' => [
qr/sub custom_method { 'custom_method works' }\n0;\n\n# You can replace.*\n1;\n\z/,
},
);
+# test dry-run mode
+$t->dump_test(
+ classname => 'DBICTest::DumpMore::DryRun',
+ options => {
+ dry_run => 1,
+ },
+ generated_results => [qw(Foo Bar)],
+);
+
+my $schema_file = $t->class_file('DBICTest::DumpMore::DryRun');
+ok( !-e $schema_file, "dry-run doesn't create file for schema class" );
+(my $schema_dir = $schema_file) =~ s/\.pm\z//;
+ok( !-e $schema_dir, "dry-run doesn't create subdirectory for schema namespace" );
+
done_testing;
# vim:et sts=4 sw=4 tw=0: