Permalink
Browse files

Fix failing and invalid tests

  • Loading branch information...
1 parent 9fb81a2 commit 4e442d3510e7898b3b94545d999f143814668ea6 @raggi raggi committed Dec 20, 2010
Showing with 11 additions and 1 deletion.
  1. +11 −1 test/spec_rackup.rb
View
@@ -22,9 +22,18 @@ def run_rackup(*args)
return if options[:port] == false
# Wait until the server is available
+ i = 0
begin
GET("/")
rescue
+ i += 1
+ if i > 40
+ Dir["#{root}/**/*.pid"].each {|f|
+ Process.kill(9, File.read(f)) rescue nil
+ File.delete(f)
+ }
+ raise "Server did not start"
+ end
sleep 0.05
retry
end
@@ -39,6 +48,7 @@ def output
GET "/die" rescue nil
Dir["#{root}/**/*.pid"].each do |file|
+ Process.kill(9, File.read(file).strip.to_i) rescue nil
File.delete(file)
end
@@ -115,7 +125,7 @@ def output
specify "rackup --version" do
run_rackup %{--version}, :port => false
- output.should =~ /1.0/
+ output.should =~ /Rack 1.1/
end
specify "rackup --env development includes lint" do

0 comments on commit 4e442d3

Please sign in to comment.