test/lib/temp_server.rb in rio-0.4.0 vs test/lib/temp_server.rb in rio-0.4.1

- old
+ new

@@ -12,10 +12,12 @@ } @config.merge!(server_config) ENV['RIO_TEST_PORT'] = @config[:Port] @server = create_server(@config) end - + def self.run(*args) + new.run(*args) + end def create_server(config = {}) server = WEBrick::HTTPServer.new(config) yield server if block_given? ['INT', 'TERM'].each {|signal| trap(signal) {server.shutdown}