4 t_plan
5 "Rails 3 (beta) inside alt working_directory (no embedded switches)"
6 t_begin
"setup and start" && {
8 rtmpfiles unicorn_config_tmp usocket
11 die
"unexpected $usocket"
13 rails3_app
=$
(cd rails3-app
&& pwd)
17 ( cd $rails3_app && tar cf
- .
) |
tar xf
-
18 $RAKE db
:sessions
:create
23 grep -v ^pid
$unicorn_config > $unicorn_config_tmp
24 echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
26 unicorn_rails
-c $unicorn_config_tmp \
27 --daemonize --host $host --port $port -l $usocket
30 t_begin
"pids in the right place" && {
33 die
"pid=$pid not expected"
36 unicorn_rails_pid
="$t_pfx.app/tmp/pids/unicorn.pid"
37 unicorn_pid
=$
(cat $unicorn_rails_pid)
40 t_begin
"static file serving works" && {
41 test x
"$(curl -sSf http://$listen/x.txt)" = xHELLO
44 t_begin
"socket created" && {
48 t_begin
"killing succeeds" && {