I'm trying to get started with testing in Ruby on Windows, and I have the gems installed for cucumber
capybara (1.0.0, 0.4.1.1) cucumber (0.10.2) cucumber-rails (0.4.1) rspec (2.6.0) rspec-rails (2.6.1) webrat (0.7.3)
I wrote my first feature, but when I try to run
cucumber features -n
I get an error 'cucumber' is not a recognized internal or external command, operable program or batch file.
How do you r开发者_运维技巧un cucumber tests under windows? I'm running Ruby 1.9.2 and rails 3.0.0
I had the same issue as you. The solution was to add the bin folder of the cucumber gem in the PATH environment variable:
<path_to_jruby>\lib\ruby\gems\1.8\gems\cucumber-1.2.1\bin
This seams to be a windows related issue. Not sure why but it resolved the problem. Hope it helps.
Using bundle exec cucumber features -n
should work.
Edit: Or maybe rake cucumber
There are few gotchas under windows like missing "a" character or no colored output but you should be able to use cucumber
under windows just fine.
Try to setup cucumber again. Maybe you missed soemthing during setup. If that does not help, you could try to play with http://cygwin.com/index.html
精彩评论