Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Use array arguments to Open4.popen4.

  • Loading branch information...
commit 0ccfbe485ef63249e3c7cabe4edc62c25f1fbff2 1 parent 8d1227b
Dan Peterson dpiddy authored

Showing 1 changed file with 5 additions and 3 deletions. Show diff stats Hide diff stats

  1. +5 3 tests/test_helper.rb
8 tests/test_helper.rb
@@ -68,12 +68,13 @@ def rackup_path(*parts)
68 68
69 69 def with_rackup(name)
70 70 GC.disable
71   - pid, w, r, e = Open4.popen4("rackup #{rackup_path(name)}")
72   - until e.gets =~ /HTTPServer#start:/; end
  71 + pid, w, r, e = Open4.popen4("rackup", rackup_path(name))
  72 + until e.gets.tap {|x| puts x if x } =~ /HTTPServer#start:/; end
73 73 yield
74 74 ensure
75 75 GC.enable
76 76 Process.kill(9, pid)
  77 + Process.wait(pid)
77 78 end
78 79
79 80 def server_path(*parts)
@@ -83,9 +84,10 @@ def server_path(*parts)
83 84 def with_server(name)
84 85 GC.disable
85 86 pid, w, r, e = Open4.popen4(server_path("#{name}.rb"))
86   - until e.gets =~ /ready/; end
  87 + until e.gets.tap {|x| puts x if x } =~ /ready/; end
87 88 yield
88 89 ensure
89 90 GC.enable
90 91 Process.kill(9, pid)
  92 + Process.wait(pid)
91 93 end

0 comments on commit 0ccfbe4

Please sign in to comment.
Something went wrong with that request. Please try again.