Created
May 10, 2011 10:17
-
-
Save vitaliel/964227 to your computer and use it in GitHub Desktop.
This file contains 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
#!/usr/bin/env ruby | |
# Copy path from rspect stack trace and execute it | |
# spm ./spec/models/space_spec.rb:867 | |
path = ARGV[0] | |
file, number, _ = path.split ':' | |
number = number.to_i | |
line = number > 0 ? " -l #{number}" : "" | |
exec "rspec -b -fn --color#{line} #{file}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment