Skip to content

Instantly share code, notes, and snippets.

@indirect
Created August 19, 2010 22:47
Show Gist options
  • Save indirect/539132 to your computer and use it in GitHub Desktop.
Save indirect/539132 to your computer and use it in GitHub Desktop.
one command for RSpec 1 and 2
# easy spec running
function s {
if grep -q -i "RSpec.configure do" spec/spec_helper.rb; then
# echo "rspec2!"
if [ -z "$*" ]; then
rspec -fs -c spec
else
rspec -fs -c $*
fi
else
# echo "rspec1!"
if [ -z "$*" ]; then
spec _1.3.1_ -fs -c spec
else
spec _1.3.1_ -fs -c $*
fi
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment