开发者

How do I get 'rake test:acceptance' to run successfully on Windows?

开发者 https://www.devze.com 2023-01-04 14:31 出处:网络
I am currently investigating using the selenium-on-rails plug-in for testing an upcoming web app that we are developing.

I am currently investigating using the selenium-on-rails plug-in for testing an upcoming web app that we are developing. I've written some tests, and can get them to run successfully in the test runner in the browser, however when I try to run them from the command line using 'rake test:acceptance' I see t开发者_运维知识库he following error:

rake aborted!
fork() function is unimplemented on this machine

I have installed the win32-open3 gem and win32-process, neither of these seem to have helped. Any ideas how I can get this working?


I managed to resolve this by adding the following to the top of acceptance_test_runner.rb:

require 'win32/open3'
require 'win32/process'

However the script was also determining my platform as 'i386-mingw32', which does not match the regexp the script uses to determine if you are on windows /mswin/. Resolved this second issue by manually specifying

RUBY_PATH=mswin

Phew.

0

精彩评论

暂无评论...
验证码 换一张
取 消