简体   繁体   English

黄瓜:web_steps.rb

[英]Cucumber: web_steps.rb

I'm wasting my time here and I can't seem to figure this out.. 我在这里浪费时间,似乎无法弄明白这一点......

I have used Cucumber in Rails applications before, and if I'm not mistaken, it generates the features/step_definitions/web_steps.rb file when you run rails g cucumber:install . 我以前在Rails应用程序中使用过Cucumber,如果我没弄错的话,它会在你运行rails g cucumber:install时生成features/step_definitions/web_steps.rb文件。 Right? 对?

I looked this up in a book I was using a while ago to learn Rails and it says so there aswell: 我在前一段时间用来学习Rails的书中看了这个,它也是这样说的:

It nevertheless passes because of the features/step_definitions/web_steps.rb file, which was generated when you ran the rails generate cucumber:install command. 然而,由于您运行rails generate cucumber:install命令时生成的features / step_definitions / web_steps.rb文件,它仍然通过。

However, when I run it in this application I'm trying to start working on, it does not generate it.. 但是,当我在这个应用程序中运行它时,我正在尝试开始工作,它不会生成它..

$ rails g cucumber:install
      create  config/cucumber.yml
      create  script/cucumber
       chmod  script/cucumber
      create  features/step_definitions
      create  features/support
      create  features/support/env.rb
       exist  lib/tasks
      create  lib/tasks/cucumber.rake
       force  config/database.yml

No web_steps.rb to be found. 找不到web_steps.rb Am I losing my mind here? 我在这里失去理智吗?

Thanks. 谢谢。

Which version of cucumber are you using? 您使用的是哪种黄瓜? if it is a recent version, see 如果是最新版本,请参阅

https://github.com/cucumber/cucumber-rails/blob/f027440965b96b780e84e50dd47203a2838e8d7d/History.md https://github.com/cucumber/cucumber-rails/blob/f027440965b96b780e84e50dd47203a2838e8d7d/History.md

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM