From 09f89fc0182e17953ec27b15b38d2c8b1e59c667 Mon Sep 17 00:00:00 2001 From: Moritz Bunkus Date: Tue, 10 Dec 2013 16:32:01 +0100 Subject: [PATCH] RDBO-Consistency-Test auf __PACKAGE__->meta_initialize --- t/rdbo_consistency.t | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/t/rdbo_consistency.t b/t/rdbo_consistency.t index 89d78a557..635585f26 100644 --- a/t/rdbo_consistency.t +++ b/t/rdbo_consistency.t @@ -23,6 +23,7 @@ my %no_metasetup_ok = map { ($_ => 1) } qw(Object.pm VC.pm); my @dbs = find_pms('SL/DB'); my @metasetups = find_pms('SL/DB/MetaSetup'); my %metasetup_content = map { ($_ => scalar(read_file("SL/DB/MetaSetup/$_"))) } @metasetups; +my %db_content = map { ($_ => scalar(read_file("SL/DB/$_"))) } @dbs; my $all_content = read_file('SL/DB/Helper/ALL.pm'); my $mapping_content = read_file('SL/DB/Helper/Mappings.pm'); @@ -78,10 +79,17 @@ sub test_metasetup_has_table_to_class_mapping { } } +sub test_db_contains_meta_initialize { + foreach my $pm (grep { !m{^(?:Object|VC)\.pm$} } @dbs) { + ok($db_content{$pm} =~ m/\n__PACKAGE__->meta->initialize;/, "$pm contains __PACKAGE__->meta->initialize;"); + } +} + test_db_has_metasetup(); test_metasetup_has_db(); test_db_included_in_all(); test_use_in_all_exists_as_db(); test_metasetup_has_table_to_class_mapping(); +test_db_contains_meta_initialize(); done_testing(); -- 2.20.1