aboutsummaryrefslogtreecommitdiffstats
path: root/railties/test/mocks/fcgi.rb
blob: 071b8e18484c66290b9629473f2dbfc21450b89f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
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