Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

detect word boundaries around 'spec_helper' #2

Merged
merged 1 commit into from

2 participants

@stevenharman

When determining if Rails is needed, detect word boundaries around spec_helper, so folks can use things like fast_spec_helper, no_rails_spec_helper, etc., without paying the Bundler tax.

@stevenharman stevenharman detect word boundaries around 'spec_helper'
When determining if Rails is needed, detect word boundaries around the
'spec_helper', so folks can use things like 'fast_spec_helper' or
'no_rails_spec_helper', etc.
d018ce7
@garybernhardt garybernhardt merged commit c9f063e into garybernhardt:master
@garybernhardt

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Nov 3, 2011
  1. @stevenharman

    detect word boundaries around 'spec_helper'

    stevenharman authored
    When determining if Rails is needed, detect word boundaries around the
    'spec_helper', so folks can use things like 'fast_spec_helper' or
    'no_rails_spec_helper', etc.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 1 deletion.
  1. +1 −1  das-0010-fast-tests-with-and-without-rails/test
View
2  das-0010-fast-tests-with-and-without-rails/test
@@ -17,7 +17,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 '\bspec_helper\b' $grep_filename) > /dev/null
if [ $? -eq 1 ]; then # no match; we have a stand-alone spec
need_rails=''
fi
Something went wrong with that request. Please try again.