Class: RSpec::Core::DRbRunner
- Defined in:
- lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb
Instance Method Summary collapse
- #drb_argv ⇒ Object
- #drb_port ⇒ Object
-
#initialize(options, configuration = RSpec.configuration) ⇒ DRbRunner
constructor
A new instance of DRbRunner.
- #run(err, out) ⇒ Object
Constructor Details
#initialize(options, configuration = RSpec.configuration) ⇒ DRbRunner
Returns a new instance of DRbRunner.
7 8 9 10 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb', line 7 def initialize(, configuration=RSpec.configuration) @options = @configuration = configuration end |
Instance Method Details
#drb_argv ⇒ Object
26 27 28 29 30 31 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb', line 26 def drb_argv @drb_argv ||= begin @options.configure_filter_manager(@configuration.filter_manager) DRbOptions.new(@options., @configuration.filter_manager). end end |
#drb_port ⇒ Object
12 13 14 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb', line 12 def drb_port @options.[:drb_port] || ENV['RSPEC_DRB'] || 8989 end |
#run(err, out) ⇒ Object
16 17 18 19 20 21 22 23 24 |
# File 'lib/rubypitaya/app-template/vendor/bundle/ruby/3.1.0/gems/rspec-core-3.12.0/lib/rspec/core/drb.rb', line 16 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(drb_argv, err, out) end |