Class: RSpec::Core::DRbCommandLine
- Inherits:
-
Object
- Object
- RSpec::Core::DRbCommandLine
- Defined in:
- lib/rspec/core/drb_command_line.rb
Instance Method Summary (collapse)
- - (Object) drb_port
-
- (DRbCommandLine) initialize(options)
constructor
A new instance of DRbCommandLine.
- - (Object) run(err, out)
Constructor Details
- (DRbCommandLine) initialize(options)
A new instance of DRbCommandLine
7 8 9 |
# File 'lib/rspec/core/drb_command_line.rb', line 7 def initialize() @options = end |
Instance Method Details
- (Object) drb_port
11 12 13 |
# File 'lib/rspec/core/drb_command_line.rb', line 11 def drb_port @options.[:drb_port] || ENV['RSPEC_DRB'] || 8989 end |
- (Object) run(err, out)
15 16 17 18 19 20 21 22 23 |
# 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 |