grep for exact match when looking for test_helper
This commit is contained in:
parent
453f55587a
commit
8b2c21e347
|
@ -9,7 +9,7 @@ if [ $# -gt 0 ]; then # we have args
|
||||||
# Remove trailing line numbers from filename, e.g. spec/my_spec.rb:33
|
# Remove trailing line numbers from filename, e.g. spec/my_spec.rb:33
|
||||||
grep_filename=`echo $1 | sed 's/:.*$//g'`
|
grep_filename=`echo $1 | sed 's/:.*$//g'`
|
||||||
|
|
||||||
(set +e; grep -r 'spec_helper' $grep_filename) > /dev/null
|
(set +e; grep -r '^spec_helper$' $grep_filename) > /dev/null
|
||||||
if [ $? -eq 1 ]; then # no match; we have a stand-alone spec
|
if [ $? -eq 1 ]; then # no match; we have a stand-alone spec
|
||||||
need_rails=''
|
need_rails=''
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue
Block a user