Class::DBI Testing Testing Class::DBI - Facilitating "Best Practices" #9

Using Class::DBI::Test::TempDB - Four Steps

1. Grab a YAML dump of your production database schema - use SQL::Translator

2. Add a test database class to your Class::DBI library, descended from Class::DBI::Test::TempDB

3. Use it to connect Class::DBI table classes to the test database

4. Write tests that create and destroy all their own data

Copyright © 2004 Dan Friedman