1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
puma--puma/test/shell/t1.rb

19 lines
363 B
Ruby
Raw Normal View History

system "ruby -rrubygems -Ilib bin/puma -p 10102 -C test/shell/t1_conf.rb test/rackup/hello.ru &"
2012-10-13 13:15:59 -04:00
sleep 5
system "curl http://localhost:10102/"
system "kill `cat t1-pid`"
sleep 1
log = File.read("t1-stdout")
File.unlink "t1-stdout" if File.file? "t1-stdout"
File.unlink "t1-pid" if File.file? "t1-pid"
2012-10-13 13:15:59 -04:00
if log =~ %r!GET / HTTP/1\.1!
exit 0
else
exit 1
end