Closed eugenebolshakov closed 14 years ago
The setting is available in rails 2.3 http://bit.ly/Nnasy. AFAIK in earlier versions templates are eager loaded if config.cache_classes is set to "true", which is required to use cucumber http://bit.ly/Hrc57. So there does not seem to be an easy way to disable that for cucumber in rails < 2.3.
Thank you for reporting this, this is a very sensible default. Spork should definitely handle this out of the box - it already prevents the app from pre-loading.
I just released Spork 0.5.7 which addresses this issue.
See the link below:
Basically, rather than forcing cache_classes to be false, or cache_template_loading to be false, I 'trapped' the method responsible for eager loading views so it would just be delayed until after the fork.
Tested and passed in rails 2.3.2, 2.2.2, 2.1.2, 2.0.5
And so changes you make in you views after spork is loaded are not hooked up.
config.action_view.cache_template_loading should be set to "false" in confing/environments/test.rb (and config/environments/cucumber.rb if you have that).
Maybe the instruction should be added to the README.