* Misc
- Refactored capability handling in Storage::DBI, allows for
standardized capability handling wrt query/enable/disable
+ - Entire test suite now passes under DBIC_TRACE=1
- Makefile.PL no longer imports GetOptions() to interoperate
better with Catalyst installers
- Bumped minimum Module::Install for developers
my $test_requires = {
'File::Temp' => '0.22',
'Test::Builder' => '0.33',
- 'Test::Exception' => '0',
+ 'Test::Exception' => '0.31',
'Test::More' => '0.92',
'Test::Warn' => '0.21',
};
],{ RaiseError => 1, PrintError => 1 });
}
+$schema->storage->debug(0); # these tests spew up way too much stuff, disable trace
+
my $big_long_string = "\x00\x01\x02 abcd" x 125000;
my $new;
my $schema = DBICTest->init_schema;
-my $e_start = quotemeta('DBIx::Class::');
-
warnings_are ( sub {
throws_ok (
sub {
$schema->resultset('CD')->create({ title => 'vacation in antarctica' })
},
- qr/$e_start.+constraint failed.+NULL/s
+ qr/DBI Exception.+constraint failed.+cd\.artist.+NULL/s
); # as opposed to some other error
}, [], 'No warnings besides exception' );
sub {
$dbh->do ('INSERT INTO nonexistent_table VALUES (1)')
},
- qr/$e_start.+DBI Exception.+no such table/,
+ qr/DBI Exception.+no such table.+nonexistent_table/s,
'DBI exceptions properly handled by dbic-installed callback'
);
sub {
$dbh->do ('INSERT INTO nonexistent_table VALUES (1)')
},
- qr/DBI Exception.+unhandled by DBIC.+no such table/,
+ qr/DBI Exception.+unhandled by DBIC.+no such table.+nonexistent_table/s,
'callback works after $schema is gone'
);
}