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/cucumber.rb
David Rodríguez 393dcb8992 Fix circular require
"capybara/dsl.rb" already requires "capybara.rb". We also update
"capybara/cucumber.rb" to catch up with this change.
2015-12-11 10:42:09 +01:00

26 lines
495 B
Ruby

require 'capybara/dsl'
require 'capybara/rspec/matchers'
World(Capybara::DSL)
World(Capybara::RSpecMatchers)
After do
Capybara.reset_sessions!
end
Before do
Capybara.use_default_driver
end
Before '@javascript' do
Capybara.current_driver = Capybara.javascript_driver
end
Before do |scenario|
scenario.source_tag_names.each do |tag|
driver_name = tag.sub(/^@/, '').to_sym
if Capybara.drivers.has_key?(driver_name)
Capybara.current_driver = driver_name
end
end
end