4 echo "$0 is broken under Rubinius for now"
9 t_plan
5 "Rails 3 (beta) inside alt working_directory (w/ config.ru)"
11 t_begin
"setup and start" && {
13 rtmpfiles unicorn_config_tmp usocket
16 die
"unexpected $usocket"
18 rails3_app
=$
(cd rails3-app
&& pwd)
22 ( cd $rails3_app && tar cf
- .
) |
tar xf
-
23 $RAKE db
:sessions
:create
28 echo "#\\--daemonize --host $host --port $port -l $usocket" \
29 >> $t_pfx.app
/config.ru
31 # we have --host/--port in config.ru instead
32 grep -v ^listen
$unicorn_config |
33 grep -v ^pid
> $unicorn_config_tmp
34 echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
36 unicorn_rails
-c $unicorn_config_tmp
39 t_begin
"pids in the right place" && {
42 die
"pid=$pid not expected"
45 unicorn_rails_pid
="$t_pfx.app/tmp/pids/unicorn.pid"
46 unicorn_pid
=$
(cat $unicorn_rails_pid)
49 t_begin
"static file serving works" && {
50 test x
"$(curl -sSf http://$listen/x.txt)" = xHELLO
53 t_begin
"socket created" && {
57 t_begin
"killing succeeds" && {