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
Vladimir Dementyev 2cb2357d39 Let's use Rubocop! (#1325)
* Add limited rubocop config and TODO config

* Remove trailing whitespaces and blanklines

* Add rubocop rake task; upd travis.yml
2017-06-04 13:21:05 -07:00

18 lines
354 B
Ruby

system "ruby -rubygems -I../../lib ../../bin/puma -p 10102 -C t1_conf.rb ../hello.ru &"
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"
if log =~ %r!GET / HTTP/1\.1!
exit 0
else
exit 1
end