Commit 7cda54c2 authored by Andreas Brandl's avatar Andreas Brandl

Make spring a runtime option for Guard

parent 09d8ae14
......@@ -2,8 +2,9 @@
# More info at https://github.com/guard/guard#readme
# If using spring, change command to "spring rspec"
guard :rspec, cmd: "bundle exec rspec" do
cmd = ENV['SPRING'] ? 'spring rspec' : 'bundle exec rspec'
guard :rspec, cmd: cmd do
require "guard/rspec/dsl"
dsl = Guard::RSpec::Dsl.new(self)
......
......@@ -50,13 +50,7 @@ Use [guard](https://github.com/guard/guard) to continuously monitor for changes
bundle exec guard
```
When using spring and guard together, consider adjusting Guardfile:
```ruby
guard :rspec, cmd: "spring rspec" do
# ...
end
```
When using spring and guard together, use `SPRING=1 bundle exec guard` instead to make use of spring.
### General guidelines
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment