Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Approaches to speeding up RSpec request specs

I have 33 specs running at about 5s, which at this rate is going to make for an slow test suite. I tracked it down to the request specs (4+ seconds), as the model specs run at a fraction of the time.

I've checked and there's nothing overly complex or unnecessary with my request specs, so I'm not sure where to go with making them faster other than to only run them perhaps before a push of code to make sure all is groovy.

What are the best approaches to speeding up request specs?

like image 783
Eric M. Avatar asked Aug 01 '11 16:08

Eric M.


1 Answers

I use Spork to speed up my tests. It keeps the whole environment loaded to gain time.

Have a look at this blog: http://ykyuen.wordpress.com/2010/12/14/rails-running-rspec-with-spork-test-server/

like image 120
apneadiving Avatar answered Oct 18 '22 18:10

apneadiving