about summary refs log tree commit homepage
path: root/test
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2009-02-04 14:30:40 -0800
committerEric Wong <normalperson@yhbt.net>2009-02-09 19:50:36 -0800
commit28d571b7cca709641d964e00e6004facb6bfcc7e (patch)
treeed260a408088db92adb190d2b9eddaa6be8ab580 /test
parent66254b6f2b0ebb3899413b12d96614ac9318daae (diff)
downloadunicorn-28d571b7cca709641d964e00e6004facb6bfcc7e.tar.gz
Avoid conflicting with existing Mongrel libraries since
we'll be incompatible and break things w/o disrupting
Mongrel installations.
Diffstat (limited to 'test')
-rw-r--r--test/mongrel.conf2
-rw-r--r--test/test_helper.rb4
-rw-r--r--test/unit/test_http_parser.rb14
-rw-r--r--test/unit/test_response.rb2
-rw-r--r--test/unit/test_semaphore.rb4
-rw-r--r--test/unit/test_server.rb8
-rw-r--r--test/unit/test_threading.rb2
7 files changed, 18 insertions, 18 deletions
diff --git a/test/mongrel.conf b/test/mongrel.conf
index 3daa23a..64c1a8f 100644
--- a/test/mongrel.conf
+++ b/test/mongrel.conf
@@ -1 +1 @@
-uri "/fromconf", :handler => Mongrel::Error404Handler.new("test")
+uri "/fromconf", :handler => Unicorn::Error404Handler.new("test")
diff --git a/test/test_helper.rb b/test/test_helper.rb
index ab97a9f..21d9e81 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -22,7 +22,7 @@ require 'stringio'
 require 'pp'
 require 'rubygems'
 
-require 'mongrel'
+require 'unicorn'
 
 if ENV['DEBUG']
   require 'ruby-debug'
@@ -71,7 +71,7 @@ end
 
 # process_based_port provides a port number, usable for TCP and UDP  
 # connections based on $$ and with a 5000 as base.
-# this is required if you perform several builds of mongrel in parallel
+# this is required if you perform several builds of unicorn in parallel
 # (like continuous integration systems)
 def process_based_port
   5000 + $$ % 1000
diff --git a/test/unit/test_http_parser.rb b/test/unit/test_http_parser.rb
index 91482cd..ca1cd01 100644
--- a/test/unit/test_http_parser.rb
+++ b/test/unit/test_http_parser.rb
@@ -1,12 +1,12 @@
 # Copyright (c) 2005 Zed A. Shaw
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
+# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
 # for more information.
 
 require 'test/test_helper'
 
-include Mongrel
+include Unicorn
 
 class HttpParserTest < Test::Unit::TestCase
     
@@ -43,7 +43,7 @@ class HttpParserTest < Test::Unit::TestCase
     assert parser.finished?
     assert !parser.error?
 
-    # ref: http://thread.gmane.org/gmane.comp.lang.ruby.mongrel.devel/37/focus=45
+    # ref: http://thread.gmane.org/gmane.comp.lang.ruby.Unicorn.devel/37/focus=45
     # (note we got 'pen' mixed up with 'pound' in that thread,
     # but the gist of it is still relevant: these nasty headers are irrelevant
     #
@@ -124,7 +124,7 @@ class HttpParserTest < Test::Unit::TestCase
     # then that large header names are caught
     10.times do |c|
       get = "GET /#{rand_data(10,120)} HTTP/1.1\r\nX-#{rand_data(1024, 1024+(c*1024))}: Test\r\n\r\n"
-      assert_raises Mongrel::HttpParserError do
+      assert_raises Unicorn::HttpParserError do
         parser.execute({}, get, 0)
         parser.reset
       end
@@ -133,7 +133,7 @@ class HttpParserTest < Test::Unit::TestCase
     # then that large mangled field values are caught
     10.times do |c|
       get = "GET /#{rand_data(10,120)} HTTP/1.1\r\nX-Test: #{rand_data(1024, 1024+(c*1024), false)}\r\n\r\n"
-      assert_raises Mongrel::HttpParserError do
+      assert_raises Unicorn::HttpParserError do
         parser.execute({}, get, 0)
         parser.reset
       end
@@ -142,7 +142,7 @@ class HttpParserTest < Test::Unit::TestCase
     # then large headers are rejected too
     get = "GET /#{rand_data(10,120)} HTTP/1.1\r\n"
     get << "X-Test: test\r\n" * (80 * 1024)
-    assert_raises Mongrel::HttpParserError do
+    assert_raises Unicorn::HttpParserError do
       parser.execute({}, get, 0)
       parser.reset
     end
@@ -150,7 +150,7 @@ class HttpParserTest < Test::Unit::TestCase
     # finally just that random garbage gets blocked all the time
     10.times do |c|
       get = "GET #{rand_data(1024, 1024+(c*1024), false)} #{rand_data(1024, 1024+(c*1024), false)}\r\n\r\n"
-      assert_raises Mongrel::HttpParserError do
+      assert_raises Unicorn::HttpParserError do
         parser.execute({}, get, 0)
         parser.reset
       end
diff --git a/test/unit/test_response.rb b/test/unit/test_response.rb
index f0efdb1..1263a49 100644
--- a/test/unit/test_response.rb
+++ b/test/unit/test_response.rb
@@ -6,7 +6,7 @@
 
 require 'test/test_helper'
 
-include Mongrel
+include Unicorn
 
 class ResponseTest < Test::Unit::TestCase
   
diff --git a/test/unit/test_semaphore.rb b/test/unit/test_semaphore.rb
index 02c5a78..115f159 100644
--- a/test/unit/test_semaphore.rb
+++ b/test/unit/test_semaphore.rb
@@ -1,6 +1,6 @@
 root_dir = File.join(File.dirname(__FILE__), "../..")
 require File.join(root_dir, "test/test_helper")
-require File.join(root_dir, "lib/mongrel/semaphore")
+require File.join(root_dir, "lib/unicorn/semaphore")
 
 class TestSemaphore < Test::Unit::TestCase
   def setup
@@ -115,4 +115,4 @@ class TestSemaphore < Test::Unit::TestCase
   def give_up_my_time_slice
     sleep(1)
   end
-end \ No newline at end of file
+end
diff --git a/test/unit/test_server.rb b/test/unit/test_server.rb
index 4ce728d..f5043b8 100644
--- a/test/unit/test_server.rb
+++ b/test/unit/test_server.rb
@@ -1,12 +1,12 @@
 # Copyright (c) 2005 Zed A. Shaw
 # You can redistribute it and/or modify it under the same terms as Ruby.
 #
-# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
+# Additional work donated by contributors.  See http://mongrel.rubyforge.org/attributions.html
 # for more information.
 
 require 'test/test_helper'
 
-include Mongrel
+include Unicorn
 
 class TestHandler
   attr_reader :ran_test
@@ -104,9 +104,9 @@ class WebServerTest < Test::Unit::TestCase
   end
 
   def test_file_streamed_request
-    body = "a" * (Mongrel::Const::MAX_BODY * 2)
+    body = "a" * (Unicorn::Const::MAX_BODY * 2)
     long = "GET /test HTTP/1.1\r\nContent-length: #{body.length}\r\n\r\n" + body
-    do_test(long, Mongrel::Const::CHUNK_SIZE * 2 -400)
+    do_test(long, Unicorn::Const::CHUNK_SIZE * 2 -400)
   end
 
 end
diff --git a/test/unit/test_threading.rb b/test/unit/test_threading.rb
index d4ad683..5551b53 100644
--- a/test/unit/test_threading.rb
+++ b/test/unit/test_threading.rb
@@ -1,7 +1,7 @@
 root_dir = File.join(File.dirname(__FILE__), "../..")
 require File.join(root_dir, "test/test_helper")
 
-include Mongrel
+include Unicorn
 
 class FakeHandler
   @@concurrent_threads = 0