Created
November 2, 2012 09:36
-
-
Save lulalala/3999775 to your computer and use it in GitHub Desktop.
rspec with grep to run selected specs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rspecgrep() | |
{ | |
SPK_FILES=`find spec -type f -name "*_spec.rb" | grep $1` | |
echo $SPK_FILES | |
time rspec $SPK_FILES --format documentation | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This code helped me a lot thanks for the helper.
However, it looks like it's deprecated because it fails whenever you try to execute it. The main reason is that
$SPK_FILLES
seems to be treated as astring
by rspec.Here is my patch to make it work properly.