【问题标题】:How to run all Feature test in RSPEC including subfolders?如何在 RSPEC 中运行所有功能测试,包括子文件夹?
【发布时间】:2016-03-24 09:32:50
【问题描述】:

我有这样的嵌套目录:

spec/features/
├── login.rb
└── users
    ├── user_create.rb
    ├── user_edit.rb
    └── user_index.rb

使用命令 bundle exec rspec spec/features/login.rb 将运行登录测试。

我想运行所有测试,包括 用户文件夹内的测试。

类似bundle exec rspec spec/features/*.rb

我只想运行所有功能测试。

请帮忙!

【问题讨论】:

  • 你试过bundle exec rspec spec/features/吗?似乎对我有用。
  • 哦 - 对于所有测试,只需 bundle exec rspec 即可
  • 嗨@joshua.paling,感谢您的回答,但是>bundle exec rspec spec/features/ 结果为找不到示例。
  • 嗨@gmuraleekrishna,我只想运行所有功能测试。

标签: ruby-on-rails-4 rspec


【解决方案1】:

试试

 $ bundle exec rspec spec/features/

记得在文件名中添加_spec.rb

【讨论】:

  • 尤其是*_spec.rb 部分!
  • 嗨@gmuraleekrishna,感谢您的回答。但是您的答案运行了所有规范测试。我只想运行所有功能测试。
猜你喜欢
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2017-03-29
  • 1970-01-01
  • 2018-09-16
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多