unicorn.git  about / heads / tags
Rack HTTP server for Unix and fast clients
blob 8bf4066efe3ac702c38ec1f03422c2f69944cf7d 513 bytes (raw)
$ git show maint:t/t0300-rails3-basic.sh	# shows this blob on the CLI

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
 
#!/bin/sh
. ./test-rails3.sh

t_plan 3 "Rails 3 (beta) tests"

t_begin "setup and start" && {
	rails3_app=$(cd rails3-app && pwd)
	rm -rf $t_pfx.app
	mkdir $t_pfx.app
	cd $t_pfx.app
	( cd $rails3_app && tar cf - . ) | tar xf -
	$RAKE db:sessions:create
	$RAKE db:migrate
	unicorn_setup
	unicorn_rails -D -c $unicorn_config
	unicorn_wait_start
}

# add more tests here
t_begin "hit with curl" && {
	test xHELLO = x"$(curl -sSf http://$listen/x.txt)"
}

t_begin "killing succeeds" && {
	kill $unicorn_pid
}

t_done

git clone https://yhbt.net/unicorn.git