class RSpec::Core::DRbCommandLine

Public Class Methods

new(options) click to toggle source
# File lib/rspec/core/drb_command_line.rb, line 7
def initialize(options)
  @options = options
end

Public Instance Methods

drb_port() click to toggle source
# File lib/rspec/core/drb_command_line.rb, line 11
def drb_port
  @options.options[:drb_port] || ENV['RSPEC_DRB'] || 8989
end
run(err, out) click to toggle source
# File lib/rspec/core/drb_command_line.rb, line 15
def run(err, out)
  begin
    DRb.start_service("druby://localhost:0")
  rescue SocketError, Errno::EADDRNOTAVAIL
    DRb.start_service("druby://:0")
  end
  spec_server = DRbObject.new_with_uri("druby://127.0.0.1:#{drb_port}")
  spec_server.run(@options.drb_argv, err, out)
end