找不到发电机黄瓜:功能

时间:2013-09-10 10:23:30

标签: ruby-on-rails cucumber

当我尝试运行rails generate cucumber:feature时,出现错误 - Could not find generator cucumber:feature.

在我的gemfile中:

group :test do
  gem 'cucumber-rails'

  # database_cleaner is not required, but highly recommended
  gem 'database_cleaner'
end

1 个答案:

答案 0 :(得分:0)

黄瓜生成命令应该看起来像

rails generate cucumber:install 

之后转到features文件夹

并在编写功能,方案

中创建任何文件名,如article_search.feature

看起来像https://github.com/cucumber/cucumber-rails/tree/master/features

了解更多环境修复

检查features/support/env.rb

并为您的步骤定义转到 features/step_definitions文件夹

看起来像https://github.com/cucumber/cucumber-rails/tree/master/features/step_definitions