diff options
| author | Teddy Wing | 2017-05-31 11:39:45 +0200 |
|---|---|---|
| committer | Teddy Wing | 2017-05-31 18:41:54 +0200 |
| commit | a5ea240ed1eec9b500c7aa723f1a71a2f9057383 (patch) | |
| tree | abcae654f3c826217a07a7e1d25f9048db4d9d32 /Gemfile | |
| parent | 04e70325040d7178a18bb126c4f7e36103c04fd9 (diff) | |
| download | chouette-core-a5ea240ed1eec9b500c7aa723f1a71a2f9057383.tar.bz2 | |
Add 'spring-commands-rspec'
This gem allows RSpec to be used with the Spring preloader, eliminating
the Rails startup time when running tests. Was getting really annoyed at
the 10-second startup times every time I wanted to run any tests.
Here's a sample comparison running a single test file:
Before:
rspec spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb
Run options:
include {:wip=>true}
exclude {:js=>true, :meta=>true}
All examples were filtered out; ignoring {:wip=>true}
...
Finished in 2.01 seconds (files took 9.41 seconds to load)
3 examples, 0 failures
---
After:
spring rspec spec/models/chouette/vehicle_journey_at_stops_day_offset_spec.rb
Running via Spring preloader in process 45340
Run options:
include {:wip=>true}
exclude {:js=>true, :meta=>true}
All examples were filtered out; ignoring {:wip=>true}
...
Finished in 2 seconds (files took 0.76843 seconds to load)
3 examples, 0 failures
When doing TDD this is a huge workflow improvement.
Since the `/bin/` directory is ignored by .gitignore, you'll have to
generate the binstub manually to get this working:
$ bundle exec spring binstub rspec
$ git checkout bin/spring # since this file is in the repo but is
$ # also in .gitignore so shouldn't be
$ # committed.
$ bundle exec spring rspec # enjoy!
To use with rspec.vim, add this to your Vim config:
let g:rspec_command = "!bundle exec spring rspec {spec}"
Diffstat (limited to 'Gemfile')
| -rw-r--r-- | Gemfile | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -146,6 +146,7 @@ group :development do gem 'quiet_assets' gem 'license_finder' gem 'bundler-audit' + gem 'spring-commands-rspec' platforms :ruby_20, :ruby_21, :ruby_22 do gem 'better_errors' |
