in reply to Using Test::More to unit test T-SQL
Some of the literature on testing databases suggests a setup() and a teardown() method before each set of tests. That way, you'll have a known state at each batch. Make sure that the state is restored even if a test crashes.
I'd probably do that instead of the transaction approach. It's clever, but if you need to test something that itself requires a transaction, it's tricky.
|
|---|