freerange/sauron — pull request #35 by tomafro (2012-05-18 14:06:01+00:00)
Title: Delete data rather than resetting elastic search index between tests.

By using the same index for all tests, only deleting the data in the index between each test, we no longer incur a time penalty before each test that touches elastic search.

It is still necessary to reset the search index each test run (the same way the db schema is reset), but this can be done via a rake task.

Running on my system, this reduced the time taken for a test run from 34 second to about 14.