Skip to content

Instantly share code, notes, and snippets.

@NullVoxPopuli
Created July 9, 2013 13:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save NullVoxPopuli/5957480 to your computer and use it in GitHub Desktop.
Save NullVoxPopuli/5957480 to your computer and use it in GitHub Desktop.
run rspec with spork
#!/bin/bash
# start spork server if it hasn't been started already
# this may need to be manually killed if plugins, or gems change
if ps ax | grep -v grep | grep -v grep | grep spork > /dev/null
then
echo "spork is already running..."
# simple formatting with color
# drb option specifies to use spork server
bundle exec rspec --format Fuubar --color spec --drb
else
echo "spork is not running..."
echo "starting spork in the background. This will take a moment..."
echo "please re-run this script to run your tests."
bundle exec spork &
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment