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 usock
15 rails3_app
=$
(cd rails3-app
&& pwd)
19 ( cd $rails3_app && tar cf
- .
) |
tar xf
-
20 $RAKE db
:sessions
:create
25 echo "#\\--daemonize --host $host --port $port -l $usock" \
26 >> $t_pfx.app
/config.ru
28 # we have --host/--port in config.ru instead
29 grep -v ^listen
$unicorn_config |
30 grep -v ^pid
> $unicorn_config_tmp
31 echo "working_directory '$t_pfx.app'" >> $unicorn_config_tmp
33 unicorn_rails
-c $unicorn_config_tmp
36 t_begin
"pids in the right place" && {
39 die
"pid=$pid not expected"
42 unicorn_rails_pid
="$t_pfx.app/tmp/pids/unicorn.pid"
43 unicorn_pid
=$
(cat $unicorn_rails_pid)
46 t_begin
"static file serving works" && {
47 test x
"$(curl -sSf http://$listen/x.txt)" = xHELLO
50 t_begin
"socket created" && {
54 t_begin
"killing succeeds" && {