summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-08 19:39:09 +0000
committerEric Wong <normalperson@yhbt.net>2010-06-08 19:39:35 +0000
commitbfb10e16337c99fccfc86b37cff9b78857b0fa1c (patch)
tree97238834f79eb5924d10361ed5d890cf9c2ac93e
parent2c6141c8ae54f17cfb3091231dce0dde7212736b (diff)
In case we have weird Rails 3 users who choose to ignore
config.ru, we'll be ready.
-rwxr-xr-xt/t0301-rails3-missing-config-ru.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/t/t0301-rails3-missing-config-ru.sh b/t/t0301-rails3-missing-config-ru.sh
new file mode 100755
index 0000000..355ae44
--- /dev/null
+++ b/t/t0301-rails3-missing-config-ru.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+. ./test-rails3.sh
+
+t_plan 4 "Rails 3 (beta) tests for config.ru haters"
+
+t_begin "setup and start" && {
+        rails3_app=$(cd rails3-app && pwd)
+        rm -rf $t_pfx.app
+        mkdir $t_pfx.app
+        cd $t_pfx.app
+        ( cd $rails3_app && tar cf - . ) | tar xf -
+        rm config.ru
+        $RAKE db:sessions:create
+        $RAKE db:migrate
+        unicorn_setup
+        unicorn_rails -D -c $unicorn_config
+        unicorn_wait_start
+}
+
+t_begin "static file serving works" && {
+        test x"$(curl -sSf http://$listen/x.txt)" = xHELLO
+}
+
+# add more tests here
+t_begin "hit with curl" && {
+        curl -v http://$listen/ || :
+}
+
+t_begin "killing succeeds" && {
+        kill $unicorn_pid
+}
+
+t_done