aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/mocks/fcgi.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/test/mocks/fcgi.rb')
-rw-r--r--railties/test/mocks/fcgi.rb9
1 files changed, 6 insertions, 3 deletions
diff --git a/railties/test/mocks/fcgi.rb b/railties/test/mocks/fcgi.rb
index 071b8e1848..59260a684f 100644
--- a/railties/test/mocks/fcgi.rb
+++ b/railties/test/mocks/fcgi.rb
@@ -2,11 +2,14 @@ class FCGI
class << self
attr_accessor :time_to_sleep
attr_accessor :raise_exception
+ attr_accessor :each_cgi_count
def each_cgi
- sleep(time_to_sleep || 0)
- raise raise_exception, "Something died" if raise_exception
- yield "mock cgi value"
+ (each_cgi_count || 1).times do
+ sleep(time_to_sleep || 0)
+ raise raise_exception, "Something died" if raise_exception
+ yield "mock cgi value"
+ end
end
end
end