Skip to content

Instantly share code, notes, and snippets.

@vitaliel
Created May 10, 2011 10:17
Show Gist options
  • Save vitaliel/964227 to your computer and use it in GitHub Desktop.
Save vitaliel/964227 to your computer and use it in GitHub Desktop.
#!/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