redding/mr — pull request #165 by jcredding (2014-01-09 16:22:08+00:00)
Title: Use latest Assert to run tests in DB transactions

This updates to the latest Assert to make use of it's `around`
callback. This is used for system tests that interact with the
test DB. Instead of inserting and removing items from the DB and
trying to ensure it remains "clean" between each test, this uses
DB transactions. Every test is run in a transaction and then
rolled back at the end of the test. This ensures a "clean" DB and
allows removing all the code trying to manually keep the DB in
that state.

This also showed some speed improvements. Overall test suite time
went from an average of 0.69 seconds to 0.65 seconds. For MR, this
is not a huge change in overall time, but the difference is about
5% of the test suite time. On a large test suite, this could
equate to a more significant change. This may also depend on the
DB. MR uses SQLite and an in-memory database, so these benefits
may not show up in other test suites.