spec/reel/rack_worker_spec.rb in reel-0.2.0.pre vs spec/reel/rack_worker_spec.rb in reel-0.2.0

- old
+ new

@@ -1,10 +1,10 @@ require 'spec_helper' describe Reel::RackWorker do - let(:endpoint) { URI("http://#{example_addr}:#{example_port}#{example_url}") } + let(:endpoint) { URI(example_url) } let(:worker) do app = Proc.new do |env| [200, {'Content-Type' => 'text/plain'}, ['Hello world!']] [200, {'Content-Type' => 'text/plain'}, ['Hello rack world!']] @@ -27,18 +27,19 @@ end env["SERVER_NAME"].should == '0.0.0.0' env["SERVER_PORT"].should == 3000 env["REMOTE_ADDR"].should == "127.0.0.1" - env["REMOTE_HOST"].should == "127.0.0.1" env["PATH_INFO"].should == "/test" env["REQUEST_METHOD"].should == "GET" env["REQUEST_PATH"].should == "/test" env["ORIGINAL_FULLPATH"].should == "/test" env["QUERY_STRING"].should == "hello=true" env["HTTP_HOST"].should == 'www.example.com' env["HTTP_ACCEPT_LANGUAGE"].should == "en-US,en;q=0.8" env["REQUEST_URI"].should == 'http://www.example.com/test' + + %w(localhost 127.0.0.1).should include env["REMOTE_HOST"] env["rack.input"].should be_kind_of(StringIO) env["rack.input"].string.should == '' end end