Sha256: 3709fbf0f9f56d0032093eadb7dc849a4a7594d5c5404af2f3f83159012a5316

Contents?: true

Size: 659 Bytes

Versions: 7

Compression:

Stored size: 659 Bytes

Contents

require "integration/band_representer"
require 'sinatra/runner'

class ServerRunner < Sinatra::Runner
  def app_file
    File.expand_path("../server.rb", __FILE__)
  end

  def command
    "bundle exec ruby #{app_file} -p #{port} -e production"
  end

  def ping_path # to be overwritten
    '/ping'
  end
end

class SslServerRunner < ServerRunner
  def command
    "bundle exec ruby #{File.expand_path("../ssl_server.rb", __FILE__)}"
  end

  def port
    8443
  end

  def protocol
    "https"
  end
end

runner = ServerRunner.new
runner.run

ssl_runner = SslServerRunner.new
ssl_runner.run

MiniTest::Unit.after_tests do
  runner.kill
  ssl_runner.kill
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
roar-0.12.9 test/integration/runner.rb
roar-0.12.8 test/integration/runner.rb
roar-0.12.7 test/integration/runner.rb
roar-0.12.6 test/integration/runner.rb
roar-0.12.5 test/integration/runner.rb
roar-0.12.4 test/integration/runner.rb
roar-0.12.3 test/integration/runner.rb