Skip to content

Instantly share code, notes, and snippets.

@lastobelus
Created June 3, 2015 20:57
Show Gist options
  • Save lastobelus/0b76dc715a48f4004f5e to your computer and use it in GitHub Desktop.
Save lastobelus/0b76dc715a48f4004f5e to your computer and use it in GitHub Desktop.
rspec one at a time with alias to run the last one
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