about summary refs log tree commit homepage
path: root/t/t0004-working_directory_broken.sh
diff options
context:
space:
mode:
Diffstat (limited to 't/t0004-working_directory_broken.sh')
-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