Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的带有 selenium 的黄瓜功能使用默认的 Webrick 服务器运行(用于 Rails 3 应用程序)。
如何强制或设置使用瘦服务器而不是 Webrick 运行?要放入 env.rb 文件或其他任何设置?
这是最近水豚的新方法
require "rack/handler/unicorn" Capybara.register_server(:unicorn) do |app, port, host| Rack::Handler::Unicorn.run(app, :Port => port) end Capybara.server = :unicorn
两种方式:
1)关闭capybara的内置服务器并自己运行。
2)看起来有人在这里修补了能力https://github.com/jnicklas/capybara/pull/175