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

28 lines
525 B
Ruby
Raw Normal View History

2016-03-07 19:52:19 -05:00
# frozen_string_literal: true
require 'capybara/dsl'
2011-02-11 08:03:46 -05:00
require 'capybara/rspec/matchers'
World(Capybara::DSL)
World(Capybara::RSpecMatchers)
2009-11-16 14:16:12 -05:00
After do
2009-11-16 16:02:16 -05:00
Capybara.reset_sessions!
end
Before do
Capybara.use_default_driver
2009-11-16 14:16:12 -05:00
end
Before '@javascript' do
2009-11-16 16:02:16 -05:00
Capybara.current_driver = Capybara.javascript_driver
2009-11-16 14:16:12 -05:00
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
2009-11-18 17:38:27 -05:00
end