about summary refs log tree commit homepage
path: root/t/async_sinatra.ru
diff options
context:
space:
mode:
Diffstat (limited to 't/async_sinatra.ru')
-rw-r--r--t/async_sinatra.ru13
1 files changed, 13 insertions, 0 deletions
diff --git a/t/async_sinatra.ru b/t/async_sinatra.ru
new file mode 100644
index 0000000..94a24b1
--- /dev/null
+++ b/t/async_sinatra.ru
@@ -0,0 +1,13 @@
+# See http://github.com/raggi/async_sinatra
+# gem install async_sinatra -v0.1.5
+require 'sinatra/async'
+
+class AsyncTest < Sinatra::Base
+  register Sinatra::Async
+
+  aget '/:n' do |n|
+    EM.add_timer(n.to_i) { body { "delayed for #{n} seconds\n" } }
+  end
+end
+
+run AsyncTest.new