summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-06-10 19:03:12 -0700
committerEric Wong <normalperson@yhbt.net>2010-06-10 19:03:12 -0700
commit454293f71376a3601e5e087d20a7d8420fdb3260 (patch)
treec1e080b6cf3df8ce81d9b6f9040828a4582992f2
parent20e84b261be1b7452d0e91b3c7d072413c8e5aea (diff)
-rwxr-xr-xt/t0004-working_directory_broken.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/t/t0004-working_directory_broken.sh b/t/t0004-working_directory_broken.sh
new file mode 100755
index 0000000..ca9d382
--- /dev/null
+++ b/t/t0004-working_directory_broken.sh
@@ -0,0 +1,24 @@
+#!/bin/sh
+. ./test-lib.sh
+
+t_plan 3 "config.ru is missing inside alt working_directory"
+
+t_begin "setup" && {
+        unicorn_setup
+        rtmpfiles unicorn_config_tmp ok
+        rm -rf $t_pfx.app
+        mkdir $t_pfx.app
+
+        # the whole point of this exercise
+        echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
+}
+
+t_begin "fails to start up w/o config.ru" && {
+        unicorn -c $unicorn_config_tmp || echo ok > $ok
+}
+
+t_begin "fallback code was run" && {
+        test x"$(cat $ok)" = xok
+}
+
+t_done