Skip to content

Instantly share code, notes, and snippets.

@tiagoengel
Created June 12, 2017 20:31
Show Gist options
  • Save tiagoengel/5891d867cfe0f106aee62643ddcd4ea8 to your computer and use it in GitHub Desktop.
Save tiagoengel/5891d867cfe0f106aee62643ddcd4ea8 to your computer and use it in GitHub Desktop.
#!/bin/sh
echo "MAKE SURE TO START bin/mojo before you run this script!"
JS_SPECS=$(git diff-tree --no-commit-id --name-only -r HEAD | grep '\.test\.js')
RUBY_SPECS=$(git diff-tree --no-commit-id --name-only -r HEAD | grep '_spec.rb' | sed -e ':a;N;$!ba;s/\n/ /g')
if [ "$RUBY_SPECS" != "" ]; then
bin/rspec $RUBY_SPECS
fi
for file in $JS_SPECS; do
touch $file
done
echo "Check JS SPECS in the mojo tab!"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment