1
0
Fork 0
mirror of https://github.com/teamcapybara/capybara.git synced 2022-11-09 12:08:07 -05:00
teamcapybara--capybara/lib/capybara/rspec.rb

14 lines
378 B
Ruby

require 'capybara'
require 'capybara/dsl'
RSpec.configure do |config|
config.include Capybara
config.after do
Capybara.reset_sessions!
Capybara.use_default_driver
end
config.before do
Capybara.current_driver = Capybara.javascript_driver if example.metadata[:js]
Capybara.current_driver = example.metadata[:driver] if example.metadata[:driver]
end
end