我看到 Capybara 使用了一种叫做 Capybara.reset_sessions 的东西!在 cucumber.rb 下的库中,像这样
After do
Capybara.reset_sessions!
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
After do
Capybara.use_default_driver
end
如何覆盖这个值 Capybara.reset_sessions!..??
我不想在每次场景完成后都重置会话。有人可以建议我一种方法吗?谢谢