unepwcmc/SAPI — pull request #32 by agnessa (2013-03-25 22:31:46+00:00)
Title: Speed up the specs

This pull request speeds up specs from over 3.5 min to 1.5 min on my machine. The major change is that instead of loading seeds for every spec in order to be able to rely on presence of general purpose objects (such as taxonomic ranks), such objects are lazily instantiated. A couple of things follow from that:
-> it is no longer possible to rely on presence of objects in factory definitions, so all custom factories such as create(:species) had to go
-> instead, there are now factory wrapper methods to instantiate objects easily, e.g. create_species(attrs)
All specs had to be modified in order to make this change and new specs need to follow.