From 8b2c21e347a0bc64aebfae3b24f4fb5034a31999 Mon Sep 17 00:00:00 2001 From: Michael Campagnaro Date: Sun, 4 Nov 2012 18:06:40 -0500 Subject: [PATCH] grep for exact match when looking for test_helper --- scripts/test | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/test b/scripts/test index b5dea77..512b911 100755 --- a/scripts/test +++ b/scripts/test @@ -9,7 +9,7 @@ if [ $# -gt 0 ]; then # we have args # Remove trailing line numbers from filename, e.g. spec/my_spec.rb:33 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 need_rails='' fi