feat(bin): add script to run rspec when files have changed
This commit is contained in:
parent
7b1243035b
commit
e11deb18fd
1 changed files with 17 additions and 0 deletions
17
site-modules/core/files/bin/rspec-watch
Executable file
17
site-modules/core/files/bin/rspec-watch
Executable file
|
|
@ -0,0 +1,17 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Run rspec tests when files are modified in the spec or app directory.
|
||||
#
|
||||
# Example usage:
|
||||
#
|
||||
# # Run the two tests whenever a file is changed.
|
||||
# rspec-watch spec/models/user_spec.rb spec/controllers/users_controller_spec.rb
|
||||
|
||||
while inotifywait -r -e modify spec app; do
|
||||
clear
|
||||
|
||||
echo "Running tests..."
|
||||
echo ""
|
||||
|
||||
RSPEC_COVERAGE=0 bundle exec rspec -fd $@
|
||||
done
|
||||
Loading…
Reference in a new issue