title: Launching a web server inside ruby tests
body: <p>I'm writing a library to wrap tsung's functionality in a way that can be better used by rails applications. I want to write some integration tests that boil down to the following:</p>
  
  <ol>
  <li>launch a simple web server</li>
  <li>run tsung-recorder via the library</li>
  <li>launch selenium, with a firefox profile configured to use the tsung proxy, and have this fetch a page from the server launched in step 1</li>
  <li>examine the recorded library (it exists, it's in the correct location, etc.)</li>
  </ol>
  
  <p>For step 1, while I could launch a vanilla rails app externally (e.g., <code>%x{rails s}</code> ), I'm pretty sure there's a better way to programmatically create a simple web server suitable for testing.</p>
  
  <p><strong>tl;dr - What's a way to programmatically launch a simple web server inside a test?</strong></p>