Spring – A replacement for Spork



Spring – A replacement for Spork

0 0


spring-presentation


On Github suranyami / spring-presentation

Spring

A replacement for Spork

Like Spork

  • Speeds up RSpec

UNLIKE Spork

  • Speeds up Rake
  • Speeds up Rails Console
  • Requires no changes to spec_helper.rb

How to install?

  gem 'spring'

  bundle install

Usage with Guard

Guardfile:
  guard :rspec, :spring => true, :binstubs => true do
     watch('Gemfile.lock')
     watch(%r{^spec/.+_spec\.rb$})
     ...
    end
  end

Usage with rake

  $ spring rake db:migrate

Usage with Rails, Rails Console

  $ spring console

  $ spring generate migration AddTable

How much?

16 seconds

  $rails console

1 second!

  $spring console