[Rspec-devel] use case for: setup_once, teardown_once

David Astels dastels at daveastels.com
Sun May 28 21:30:23 EDT 2006

On 28-May-06, at 9:16 PM, itsme213 wrote:

> Setup and teardown are called once for each specify.
> Sometimes the setup can be very expensive (e.g. establish a ssh or ftp
> session) and the number of specs large.

This should never be done.  You never want your specifications  
dependant on a) externsl, b) expensive, and c) nondeterministic/ 
uncontrollable resources.  This is where you would use the mocking  
framework to mock the ssh/ftp interface.


More information about the Rspec-devel mailing list