|
| 1 | +# A sample Guardfile |
| 2 | +# More info at https://github.com/guard/guard#readme |
1 | 3 |
|
| 4 | +## Uncomment and set this to only include directories you want to watch |
| 5 | +# directories %w(app lib config test spec features) \ |
| 6 | +# .select{|d| Dir.exists?(d) ? d : UI.warning("Directory #{d} does not exist")} |
2 | 7 |
|
3 | | -guard 'rspec', cmd: 'bundle exec rspec' do |
| 8 | +## Note: if you are using the `directories` clause above and you are not |
| 9 | +## watching the project directory ('.'), then you will want to move |
| 10 | +## the Guardfile to a watched dir and symlink it back, e.g. |
| 11 | +# |
| 12 | +# $ mkdir config |
| 13 | +# $ mv Guardfile config/ |
| 14 | +# $ ln -s config/Guardfile . |
| 15 | +# |
| 16 | +# and, you'll have to watch "config/Guardfile" instead of "Guardfile" |
| 17 | + |
| 18 | +# Note: The cmd option is now required due to the increasing number of ways |
| 19 | +# rspec may be run, below are examples of the most common uses. |
| 20 | +# * bundler: 'bundle exec rspec' |
| 21 | +# * bundler binstubs: 'bin/rspec' |
| 22 | +# * spring: 'bin/rsspec' (This will use spring if running and you have |
| 23 | +# installed the spring binstubs per the docs) |
| 24 | +# * zeus: 'zeus rspec' (requires the server to be started separetly) |
| 25 | +# * 'just' rspec: 'rspec' |
| 26 | +guard :rspec, cmd: 'bundle exec rspec' do |
4 | 27 | watch(%r{^spec/.+_spec\.rb$}) |
5 | 28 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" } |
6 | 29 | watch('spec/spec_helper.rb') { "spec" } |
7 | 30 | end |
8 | | - |
|
0 commit comments