Skip to content

Instantly share code, notes, and snippets.

@enriclluelles
Created October 27, 2011 18:59
Show Gist options
  • Save enriclluelles/1320488 to your computer and use it in GitHub Desktop.
Save enriclluelles/1320488 to your computer and use it in GitHub Desktop.
MiniTest::Unit::IntegrationTestCase.class_variable_get(:@@inheritors).each do |klass|
klass.module_eval do
alias_method :setup_with_no_hook, :setup
def setup
Capybara.current_driver = :selenium_chrome
setup_with_no_hook
end
alias_method :teardown_with_no_hook, :teardown
def teardown
teardown_with_no_hook
Capybara.use_default_driver
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment