Skip to content

Instantly share code, notes, and snippets.

@jugyo
Created April 26, 2011 05:22
Show Gist options
  • Save jugyo/941830 to your computer and use it in GitHub Desktop.
Save jugyo/941830 to your computer and use it in GitHub Desktop.
TextMate command to run single rspec example with spork
#!/usr/bin/env ruby
require 'drb'
begin
DRb.start_service("druby://localhost:0")
rescue SocketError, Errno::EADDRNOTAVAIL
DRb.start_service("druby://:0")
end
spec_server = DRbObject.new_with_uri("druby://localhost:8989")
spec_server.run(
[
"--format", "textmate",
"-l", ENV['TM_LINE_NUMBER'],
ENV['TM_FILEPATH']
],
STDERR,
STDOUT
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment