简体   繁体   English

从 RubyMine 运行 Rspec 时未发现测试

[英]No tests were found when running Rspec from RubyMine

I recently installed RubyMine in my Mac and I am trying to run test cases present in my project by right clicking on the *_spec.rb file and using "Run 'RSpec:...." option.我最近在我的 Mac 中安装了 RubyMine,我试图通过右键单击 *_spec.rb 文件并使用“Run 'RSpec:....”选项来运行项目中存在的测试用例。 But I get the message "no tests were found".但我收到消息“未找到测试”。

I am able to run my test cases from RubyMine terminal and from my Mac terminal but not by the option provided by RubyMine ( like explained above)我可以从 RubyMine 终端和我的 Mac 终端运行我的测试用例,但不能通过 RubyMine 提供的选项(如上所述)

Can some one please suggest what could be the issue?有人可以建议可能是什么问题吗?

My config is:我的配置是:

  • Ruby 2.3.3 Ruby 2.3.3

  • Rails 4.2.11.1导轨 4.2.11.1

  • RubyMine 2020.3.2红宝石矿 2020.3.2

Thanks谢谢

The reasons could be different let's start with this原因可能不同让我们从这个开始在此处输入图像描述

go to the folder that includes your specs and make sure to mark as "Test Sources Root" go 到包含您的规格的文件夹,并确保标记为“测试源根”

if this wasn't enough make go to Rubymine > Preferances > Ruby SDK and Gems and make sure that you are using the right SDK if this wasn't enough make go to Rubymine > Preferances > Ruby SDK and Gems and make sure that you are using the right SDK
在此处输入图像描述

if still have problems check the run>Edit configuration and review the configuration of running specs there如果仍然有问题,请检查运行>编辑配置并在那里查看运行规范的配置

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

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