1require "drb/drb"
2
3module Spec
4 module Runner
5 # Facade to run specs by connecting to a DRB server
6 class DrbCommandLine
7 # Runs specs on a DRB server. Note that this API is similar to that of
8 # CommandLine - making it possible for clients to use both interchangeably.
9 def self.run(options)
10 begin
11 DRb.start_service
12 spec_server = DRbObject.new_with_uri("druby://localhost:8989")
13 spec_server.run(options.argv, options.error_stream, options.output_stream)
14 rescue DRb::DRbConnError => e
15 options.error_stream.puts "No server is running"
16 end
17 end
18 end
19 end
20end