From 454293f71376a3601e5e087d20a7d8420fdb3260 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Thu, 10 Jun 2010 19:03:12 -0700 Subject: add test for erroring out when config.ru is bad --- t/t0004-working_directory_broken.sh | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100755 t/t0004-working_directory_broken.sh 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 -- cgit v1.2.3-24-ge0c7