Skip to content

Instantly share code, notes, and snippets.

@jphenow
Last active December 28, 2015 21:49
Show Gist options
  • Save jphenow/7566987 to your computer and use it in GitHub Desktop.
Save jphenow/7566987 to your computer and use it in GitHub Desktop.
Run a single Rails (or Ruby) unit test, with some globby goodness
#!/usr/bin/env zsh
test_loc="./test/**/$1_test.rb"
eval "ruby -I'lib:test' $test_loc"
# Now you can:
# rtest user
# rtest user_controller
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment