It is important to 'regularly' execute tests in an environment similar to production.
But...
Having your test suite run as fast as possible is also a big priority in development. even with autotest/guard and spork tests might be quite slow if they hit the db (I'm prefer them to indeed hit the db and not to mock every possible db call).
So one solution can be to
- use mysql in dev & production mode
- use sqlite in test
- run a CI server with mysql as the db
this way you can run your tests fast, but still have them fail if there is a mysql/sqlite incompatibility somewhere