aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/mocks/fcgi.rb
diff options
context:
space:
mode:
authorJamis Buck <jamis@37signals.com>2005-06-22 11:18:01 +0000
committerJamis Buck <jamis@37signals.com>2005-06-22 11:18:01 +0000
commitf69f3848727362648e1b44a2450d0f89dce32bb2 (patch)
treedbeceaf04e1c3db4c8eaf0b595ff128634af9c13 /railties/test/mocks/fcgi.rb
parent053cb22c17b42bdd4bf60a96fbe73df332430556 (diff)
downloadrails-f69f3848727362648e1b44a2450d0f89dce32bb2.tar.gz
rails-f69f3848727362648e1b44a2450d0f89dce32bb2.tar.bz2
rails-f69f3848727362648e1b44a2450d0f89dce32bb2.zip
Refactored dispatch.fcgi. Added unit tests for dispatch.fcgi. Added trap to recognize HUP as a graceful termination command.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1479 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/test/mocks/fcgi.rb')
-rw-r--r--railties/test/mocks/fcgi.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/railties/test/mocks/fcgi.rb b/railties/test/mocks/fcgi.rb
new file mode 100644
index 0000000000..071b8e1848
--- /dev/null
+++ b/railties/test/mocks/fcgi.rb
@@ -0,0 +1,12 @@
+class FCGI
+ class << self
+ attr_accessor :time_to_sleep
+ attr_accessor :raise_exception
+
+ def each_cgi
+ sleep(time_to_sleep || 0)
+ raise raise_exception, "Something died" if raise_exception
+ yield "mock cgi value"
+ end
+ end
+end