diff options
author | Jamis Buck <jamis@37signals.com> | 2005-06-22 11:18:01 +0000 |
---|---|---|
committer | Jamis Buck <jamis@37signals.com> | 2005-06-22 11:18:01 +0000 |
commit | f69f3848727362648e1b44a2450d0f89dce32bb2 (patch) | |
tree | dbeceaf04e1c3db4c8eaf0b595ff128634af9c13 /railties/test/mocks/dispatcher.rb | |
parent | 053cb22c17b42bdd4bf60a96fbe73df332430556 (diff) | |
download | rails-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/dispatcher.rb')
-rw-r--r-- | railties/test/mocks/dispatcher.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/railties/test/mocks/dispatcher.rb b/railties/test/mocks/dispatcher.rb new file mode 100644 index 0000000000..9ca6b609c6 --- /dev/null +++ b/railties/test/mocks/dispatcher.rb @@ -0,0 +1,11 @@ +class Dispatcher + class <<self + attr_accessor :time_to_sleep + attr_accessor :raise_exception + + def dispatch(cgi) + sleep(time_to_sleep || 0) + raise raise_exception, "Something died" if raise_exception + end + end +end |