Class | Spork::Server |
In: |
lib/spork/server.rb
|
Parent: | Object |
An abstract class that is implemented to create a server
(This was originally based off of spec_server.rb from rspec-rails (David Chelimsky), which was based on Florian Weber‘s TDDMate)
port | [RW] | |
run_strategy | [R] |
Sets up signals and starts the DRb service. If it‘s successful, it doesn‘t return. Not ever. You don‘t need to override this.
This is the public facing method that is served up by DRb. To use it from the client side (in a testing framework):
DRb.start_service("druby://localhost:0") # this allows Ruby to do some magical stuff so you can pass an output stream over DRb. # see http://redmine.ruby-lang.org/issues/show/496 to see why localhost:0 is used. spec_server = DRbObject.new_with_uri("druby://127.0.0.1:8989") spec_server.run(options.argv, $stderr, $stdout)
When implementing a test server, don‘t override this method: override run_tests instead.