当我将我的 rspec 测试之一设置为 :js => true 时,我收到以下错误。我正在使用以下版本:
Rails — 3.2.2
Rspec — 2.9.0
Capybara — 1.1.2
根据文档,Capybara 应该通过 Selenium 使用 :js => true 运行任何规范。我尝试将 Selenium 添加到我的 Gemfile 中,以防 Capybara 无法找到它,但这不起作用。
1) UserSignups GET /signup supports js
Failure/Error: visit signup_path
LoadError:
no such file to load -- {
"frozen": {
"app.update.auto": false,
"app.update.enabled": false,
"browser.download.manager.showWhenStarting": false,
"browser.EULA.override": true,
"browser.EULA.3.accepted": true,
"browser.link.open_external": 2,
"browser.link.open_newwindow": 2,
"browser.offline": false,
"browser.safebrowsing.enabled": false,
"browser.safebrowsing.malware.enabled": false,
"browser.search.update": false,
"browser.sessionstore.resume_from_crash": false,
"browser.shell.checkDefaultBrowser": false,
"browser.tabs.warnOnClose": false,
"browser.tabs.warnOnOpen": false,
"devtools.errorconsole.enabled": true,
"dom.disable_open_during_load": false,
"extensions.autoDisableScopes": 10,
"extensions.logging.enabled": true,
"extensions.update.enabled": false,
"extensions.update.notifyUser": false,
"network.manage-offline-status": false,
"network.http.phishy-userpass-length": 255,
"offline-apps.allow_by_default": true,
"prompts.tab_modal.enabled": false,
"security.fileuri.origin_policy": 3,
"security.fileuri.strict_origin_policy": false,
"security.warn_entering_secure": false,
"security.warn_entering_secure.show_once": false,
"security.warn_entering_weak": false,
"security.warn_entering_weak.show_once": false,
"security.warn_leaving_secure": false,
"security.warn_leaving_secure.show_once": false,
"security.warn_submit_insecure": false,
"security.warn_viewing_mixed": false,
"security.warn_viewing_mixed.show_once": false,
"signon.rememberSignons": false,
"toolkit.networkmanager.disable": true,
"toolkit.telemetry.prompted": 2,
"toolkit.telemetry.enabled": false,
"toolkit.telemetry.rejected": true
},
"mutable": {
"browser.dom.window.dump.enabled": true,
"browser.startup.page": 0,
"browser.startup.homepage": "about:blank",
"dom.max_script_run_time": 30,
"dom.report_all_js_exceptions": true,
"javascript.options.showInConsole": true,
"network.http.max-connections-per-server": 10,
"webdriver_accept_untrusted_certs": true,
"webdriver_assume_untrusted_issuer": true
}
}