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
Anders Törnqvist aa46894ce7 Add RSpec support in Capybara itself, closes #187
Just the basics of including Capybara and setting
up some metadata to switch between drivers.
2010-12-10 14:54:46 +01:00

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