codegram/spinach — Issue #69: Change Capybara javascript driver automatically
Author: oriolgual
Created: 2011-11-04 14:38:40+00:00
State: open
Labels: Feature

Since now we've tag support, it would be great to change Capybara's driver automatically:

Spinach.hooks.on_tag('javascript') do
Capybara.current_driver = Capybara.javascript_driver
end

Spinach.hooks.after_scenario do |data|
Capybara.use_default_driver
end

See https://github.com/codegram/spinach/blob/master/lib/spinach/capybara.rb#L33