Created
June 3, 2015 20:57
-
-
Save lastobelus/0b76dc715a48f4004f5e to your computer and use it in GitHub Desktop.
rspec one at a time with alias to run the last one
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
alias rsp1="script -q /dev/null rspec spec --fail-fast --order defined | tee /tmp/lastrspec; ansifilter /tmp/lastrspec > /tmp/tmplastrspec; mv /tmp/tmplastrspec /tmp/lastrspec" | |
rsplast() { | |
local rcmd=`grep -e '^rspec ' /tmp/lastrspec | cut -f 2 -d ' '` | |
# local rcmd=`grep -e '^rspec ' /tmp/lastrspec` | |
echo "rspec $rcmd" | |
bundle exec rspec $rcmd | |
history -s bundle exec rspec $rcmd | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment