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

Make spring a runtime option for Guard

parent 09d8ae14
...@@ -2,8 +2,9 @@ ...@@ -2,8 +2,9 @@
# More info at https://github.com/guard/guard#readme # More info at https://github.com/guard/guard#readme
# If using spring, change command to "spring rspec" cmd = ENV['SPRING'] ? 'spring rspec' : 'bundle exec rspec'
guard :rspec, cmd: "bundle exec rspec" do
guard :rspec, cmd: cmd do
require "guard/rspec/dsl" require "guard/rspec/dsl"
dsl = Guard::RSpec::Dsl.new(self) dsl = Guard::RSpec::Dsl.new(self)
......
...@@ -50,13 +50,7 @@ Use [guard](https://github.com/guard/guard) to continuously monitor for changes ...@@ -50,13 +50,7 @@ Use [guard](https://github.com/guard/guard) to continuously monitor for changes
bundle exec guard bundle exec guard
``` ```
When using spring and guard together, consider adjusting Guardfile: When using spring and guard together, use `SPRING=1 bundle exec guard` instead to make use of spring.
```ruby
guard :rspec, cmd: "spring rspec" do
# ...
end
```
### General guidelines ### 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