DBIx-Class-Schema-Loader-DBI-RelPatterns

 view release on metacpan or  search on metacpan

Makefile.PL  view on Meta::CPAN

requires 'MRO::Compat'                 => '0.09';

if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) {
    eval "require $_; 1"
      or die "\nYou need $_ installed to run this Makefile.PL in author mode:\n\n$@\n"
      foreach qw(Module::Install::ReadmeFromPod Module::Install::ReadmeMarkdownFromPod);

    warn "\n*** AUTHOR MODE: some optional dependencies converted to hard requires.\n\n";

    test_requires 'DBD::SQLite'        => '1.40'; # with statistics_info method support
    test_requires 'Test::Differences'  => '0.60';

    readme_from();
    readme_markdown_from_pod();
    realclean_files( qw[MANIFEST README README.mkdn] );
}

tests_recursive;

repository 'https://github.com/azlewa/DBIx-Class-Schema-Loader-DBI-RelPatterns';

t/10loader.t  view on Meta::CPAN

        test_rels => [
            'Bars.quuxref' => 'quuxs.quuxid', # foreign key
        ],
    );
    
    isa_ok(get_loader($schema2), 'DBIx::Class::Schema::Loader::DBI::RelPatterns', 'loader');
} "loader class does not kill the loader";

SKIP: {
    skip "nothing to compare", 1 unless ref $schema1 && ref $schema2 && $schema1 != $schema2;
    skip "Test::Differences 0.60+ not installed", 1 unless
           eval "use Test::Differences 0.60 qw/eq_or_diff/; 1"
        && defined &eq_or_diff;
    $schema1->storage(undef);
    $schema2->storage(undef);
    eq_or_diff($schema1, $schema2, "schemas look equivalent");
}

done_testing();



( run in 0.282 second using v1.01-cache-2.11-cpan-131fc08a04b )