NUBIC/ncs_navigator_core — pull request #207 by rsutphin (2013-06-07 19:52:29+00:00)
Title: Improve speed of CaseCloner specs (#3996)

This commit provides an overall speedup for the CaseCloner specs of approximately 65x. Half of this is achieved by moving expensive, repeated database record setup to `before(:all)`. This is acceptable here because the setup that is moved to `before(:all)` is read-only.

The other half of the speedup comes from moving expensive, repeated test subject creation to `before(:all)`. This is done in the innermost context, where the most complex participant is being cloned. This works, again, because the test data within this context never changes and so the clone created for each spec has identical properties.