jonleighton/spring — pull request #45 by senny (2013-02-03 13:14:22+00:00)
Title: only require spec/spec_helper.rb if it exists.

We have a custom rspec setup and don't rely on a global `spec/spec_helper.rb`.
With the current implementation of the RSpec command we can't run our specs.

Even when we can't preload the `spec_helper` it would still be an enourmous
advantage to preload the rails-stack when running our tests.

I modified the RSpec command to check if the spec_helper exists and to require
only `rspec` otherwise. While this is not an optimal solution it sill yields a
huge performance benefit in our app:

**first execution**
```
my_app :: (spring*) » time spring rspec spec/functional

Finished in 3.63 seconds
33 examples, 0 failures
bin/spring rspec spec/functional 0,64s user 0,07s system 4% cpu 14,267 total
```

**second execution**
```
my_app :: (spring*) » time spring rspec spec/functional

Finished in 3.6 seconds
33 examples, 0 failures
bin/spring rspec spec/functional 0,63s user 0,07s system 12% cpu 5,434 total
```