I don’t think mocking the SQL interface for testing is reasonable. It’s boring and the tests wouldn’t actually catch some problems, like a typo an SQL.
Setupping a test database and loading fixtures is the way to go. This package made this simple.
Inspired by the way tests are with by default on Ruby on Rails.