Skip to content

Instantly share code, notes, and snippets.

@sandro
Created February 7, 2015 01:02
Show Gist options
  • Save sandro/ef89485b439cd8c7f399 to your computer and use it in GitHub Desktop.
Save sandro/ef89485b439cd8c7f399 to your computer and use it in GitHub Desktop.
config.after(:suite) do
sessions = Capybara.send(:session_pool).values
pids = sessions.map do |session|
if Capybara::Webkit::Driver === session.driver
session.driver.browser.instance_variable_get(:@connection).pid
end
end
Process.kill("KILL", *pids.compact)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment