如何在spec_helper.rb中为Capybara Webkit设置ignore_ssl_errors选项 [英] How to set the ignore_ssl_errors option for Capybara Webkit in spec_helper.rb

查看:55
本文介绍了如何在spec_helper.rb中为Capybara Webkit设置ignore_ssl_errors选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的spec_helper文件中,我有:

In my spec_helper file I have:

  Capybara.javascript_driver = :webkit

capybara_webkit现在有了我要使用的 ignore_ssl_errors 选项。如何在我的spec_helper中指定?

capybara_webkit now has a ignore_ssl_errors option that I want to use. How do I specify that in my spec_helper?

推荐答案

在撰写本文时(capybara-webkit 1.7.1),配置似乎已简化:

As of writing (capybara-webkit 1.7.1), the configuration seems to have been simplified:

Capybara::Webkit.configure do |config|
  config.ignore_ssl_errors
end

(源)

这篇关于如何在spec_helper.rb中为Capybara Webkit设置ignore_ssl_errors选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆