Sha256: 0491168355c6f5b8632c87ba40460cd86abb0084bce50ae12b275eb84efe8231

Contents?: true

Size: 506 Bytes

Versions: 5

Compression:

Stored size: 506 Bytes

Contents

require 'spec_helper'
require 'net/http'

describe Reel::Rack::Server do
  let(:host) { "127.0.0.1" }
  let(:port) { 30000 }
  let(:body) { "hello world" }

  subject do
    app = proc { [200, {"Content-Type" => "text/plain"}, body] }
    described_class.new(app, :host => host, :port => port)
  end

  it "runs a basic Hello World app" do
    # Hax to wait for server to be started
    subject.inspect

    expect(Net::HTTP.get(URI("http://#{host}:#{port}"))).to eq body

    subject.terminate
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
reel-rack-0.0.2 spec/reel/rack/server_spec.rb
reel-rack-0.0.1 spec/reel/rack/server_spec.rb
reel-rack-0.0.1.pre2 spec/reel/rack/server_spec.rb
reel-rack-0.0.1.pre spec/reel/rack/server_spec.rb
reel-rack-0.0.0 spec/reel/rack/server_spec.rb