title: initialize': rack-test requires a rack application, but none was given (ArgumentError)
body: <p>I keep getting this error while switching from Selenium over to <code>PhantomJs/Poltergeist</code>. 
  Anybody know what I'm doing wrong? If I switch out the driver to selenium, the script works perfectly. Whenever I comment out the <code>default_driver = :selenium</code> and replace with <code>javascript_driver = :poltergeist</code> I run into this error. </p>
  
  <pre><code>initialize': rack-test requires a rack application, but none was given (ArgumentError)
  </code></pre>
  
  <p>This is all in a ruby file, no rails.</p>
  
  <pre><code>require 'rubygems'
  require 'capybara'
  require 'capybara/dsl'
  require "open-uri"
  # require "date"
  # require 'active_support/core_ext/integer/inflections'
  require 'capybara/poltergeist'
  # require 'selenium-webdriver'
  require 'pry'
  require 'phantomjs'
  # require 'database_cleaner'
  
  Capybara.run_server = false
  Capybara.javascript_driver = :poltergeist
  # Capybara.default_driver = :selenium
  Capybara.app_host = 'https://www.sameplsite.com'
  
  
  module MyCapybaraTest
    class Test
      include Capybara::DSL
  
      def login_site
          visit('https://www.sameplsite.com')
          # binding.pry
          click_link('Log in')
          fill_in('email', :with =&gt; 'joefrank@sharklasers.com')
          fill_in('password', :with =&gt; 'passwordpassword')
          check('checkbox_remember')
          click_button('Log in')
      end
  
      def click_right_game
          click_link('Create Contest')
          all('.boxed')[1].click
          check('Free practice')
          click_link('Create 1 Head-to-Head')
          save_and_open_page
      end
  
      def output_game_link
          url = URI.parse(current_url)
          puts url
      end
  
    end
  end
  
  
  t = MyCapybaraTest::Test.new
  t.login_fanduel
  t.click_right_game
  t.output_game_link
  </code></pre>