Skip to content

Instantly share code, notes, and snippets.

/spec_helper.rb Secret

Created December 1, 2014 13:49
Show Gist options
  • Save anonymous/42a1c5cfc90f44f24c1d to your computer and use it in GitHub Desktop.
Save anonymous/42a1c5cfc90f44f24c1d to your computer and use it in GitHub Desktop.
port = nil
_stdin, _stdout, stderr = Open3.popen3('rake run_fake_service')
stderr.each do |line|
if match = line.match(/has taken the stage on (\d+) for/)
port = match[1].to_i
break
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment