Created
September 13, 2010 17:51
-
-
Save matflores/577724 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# inside class Protest::TestCase | |
class << self | |
alias original_scenario scenario | |
def scenario(name, options = {}, &block) | |
original_scenario(name) do | |
old_driver, Capybara.current_driver = Capybara.current_driver, options[:driver] || Capybara.current_driver | |
instance_eval(&block) | |
Capybara.current_driver = old_driver | |
end | |
end | |
end | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment