Platinum Partner

Spork Gem To Improve RSpec Launch Time

This reduced launch time of rspec for my rails project in Ubuntu VirtualBox on Win7 host from 35 secs to 2 sec.



sudo gem install spork --prerelease


Or add following to Rails Gemfile:

gem 'spork', '>= 0.9.0.rc'

and run

sudo bundle


Run in your Rails project root.

spork --bootstrap

This will add some code and instructions to spec/spec_helper.rb. Follow the instructions and distribute configuration between sections.

Start spork server:

spork rspec


In another terminal launch specs (first green dot should appear 10 times faster the usual):

rspec --drb spec/controllers/your_controller_spec.rb


Read here how to autorestart spork with guard:
http://blog.carbonfive.com/2010/12/10/speedy-test-iterations-for-rails-3-with-spork-and-guard/
{{ tag }}, {{tag}},

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}
{{ parent.authors[0].realName || parent.author}}

{{ parent.authors[0].tagline || parent.tagline }}

{{ parent.views }} ViewsClicks
Tweet

{{parent.nComments}}