Method: Spork::Server#run
- Defined in:
- lib/spork/server.rb
#run(argv, stderr, stdout) ⇒ Object
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(.argv, $stderr, $stdout)
When implementing a test server, don’t override this method: override run_tests instead.
46 47 48 49 50 51 |
# File 'lib/spork/server.rb', line 46 def run(argv, stderr, stdout) puts "Running tests with args #{argv.inspect}..." result = run_strategy.run(argv, stderr, stdout) puts "Done.\n\n" result end |