2 require "#{File.dirname(__FILE__)}/../test_helper"
7 class ServerTest < Test::Unit::TestCase
10 URL = "http://localhost:#{PORT}/"
13 @pid = Process.fork do
14 Dir.chdir RAILS_ROOT do
16 exec("script/server -p #{PORT} > /dev/null")
23 # Process.kill(9, @pid) doesn't work because Mongrel has double-forked itself away
24 `ps awx | grep #{PORT} | grep -v grep | awk '{print $1}'`.split("\n").each do |pid|
25 system("kill -9 #{pid}")
32 def test_association_reloading
34 assert_match(/Bones: index/, open(URL + 'bones').read)