[rspec-users] spec_server errors when reloading fixture replacement pl

Tim Harper timcharper at gmail.com
Tue Jun 2 01:58:50 EDT 2009


Ben J.,
Have you given up on this?  You're right - that defeats the purpose of
Spork. You need to make sure that any code that loads code in your project
does not make it in to your Spork.prefork block.  If you are specifically
loading the models in your environment, that's your problem.

Here's some possible options to resolve what you're experiencing:

1) Add spork blocks to your environment.rb to put portions that are loading
code you develop on inside of a Spork.each_run block, and the rest of it in
a Spork.prefork block.

2) modify your environment.rb file to only load libraries like gems and
plug-ins, and set up autoload to load the rest of your classes as you need
them. Alternatively, is this is a matter of pre-caching, you could choose
not to load those classes preemptively in the test environment.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://rubyforge.org/pipermail/rspec-users/attachments/20090601/6b19cac7/attachment.html>


More information about the rspec-users mailing list