From f69f3848727362648e1b44a2450d0f89dce32bb2 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Wed, 22 Jun 2005 11:18:01 +0000 Subject: 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 --- railties/test/mocks/fcgi.rb | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 railties/test/mocks/fcgi.rb (limited to 'railties/test/mocks/fcgi.rb') 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 -- cgit v1.2.3