[rspec-users] Rails code reloading in RSpec test environment?
Justin Ko
jko170 at gmail.com
Tue Nov 22 19:57:32 EST 2011
On Nov 22, 2011, at 4:52 PM, Andrew Premdas wrote:
> On 22 November 2011 20:31, Ash Moran <ash.moran at patchspace.co.uk> wrote:
>> Hi
>>
>> I've worked on a couple of Rails 3 apps recently and the test feedback loop is killing me. With no modifications, it takes 15-25 seconds to run a single example. I've avoided Spork so far, but I've tried Spin[1]. Spin shaves a few seconds off but it's still agonising. I've also experimented with multiple Guard groups and other hacks to run isolated code in lib/, but a lot of the code can't be isolated (all the controllers, for example).
>>
>> My last resort is to try and run Rails against an environment with `config.cache_classes = false`. Has anyone tried this (and got it working)? I imagine it would have to run tests over DRb, which I've only used with Spork before. The last mention of "cache_classes" on this list was in 2009, so I thought I'd check before I invested time in it in case there any major obstacles.
>>
>> Any help appreciated
>>
>> Cheers
>> Ash
>>
> Use Ruby 1.8.7 its much faster. There is a very good screencast on
> Destroy All Software that might help also - the one about extracting
> domain objects (or something like that).
Anytime someone suggests using 1.8, a Chinchilla explodes. 1.9.3 has the "slow require" fix - please use that if it is your concern.
>
> HTH
>
> Andrew
>
> ps
>
>
>>
>> [1] http://jstorimer.github.com/spin/
>>
>> --
>> http://www.patchspace.co.uk/
>> http://www.linkedin.com/in/ashmoran
>>
>> _______________________________________________
>> rspec-users mailing list
>> rspec-users at rubyforge.org
>> http://rubyforge.org/mailman/listinfo/rspec-users
>>
>
>
>
> --
> ------------------------
> Andrew Premdas
> blog.andrew.premdas.org
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
More information about the rspec-users
mailing list