test/testrequest.rb in rack-0.4.0 vs test/testrequest.rb in rack-0.9.0
- old
+ new
@@ -41,5 +41,17 @@
}
}
end
end
end
+
+class StreamingRequest
+ def self.call(env)
+ [200, {"Content-Type" => "text/plain"}, new]
+ end
+
+ def each
+ yield "hello there!\n"
+ sleep 5
+ yield "that is all.\n"
+ end
+end