ruby-on-rails - ruby 矿 'Unable to attach test reporter to test framework'

标签 ruby-on-rails testing model rspec rubymine

rubyMine 在运行所有模型测试时出现“检测到 MiniTest 框架”错误。

我可以在常规命令行运行所有模型测试。 例如rake 规范:模型
当我使用 ruby​​Mine 时:
我可以运行一个模型测试。
但是,当我尝试在模型中运行所有测试时,我得到
检测到 MiniTest 框架。它是原始 Test::Unit 框架的限制版本。 RubyMine/IDEA Ruby 插件测试运行器需要全功能版本的框架, 否则将使用默认的控制台测试报告器。 请安装 'test-unit' gem 并在运行时激活它。

我尝试将“测试单元”添加到我的 Gemfile 并重新捆绑,但现在得到:

`/home/durrantm/.rvm/rubies/ruby-1.9.2-p180/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) 
  /home/durrantm/Downloads/RubyMine-3.2.3/rb/testing/runner/tunit_in_folder_runner.rb
Testing started at 9:33 AM ...
Work directory: /home/durrantm/Dropbox_not_syncd/webs/3/rubyists/spec/models}
Loading files.... 
=========================================
0 files were loaded.
=========================================
Searching test suites...
=========================================
0 test suites, 0 tests, 0 assertions, 0 failures, 0 errors
Process finished with exit code 0`

注意:有趣的 } 在工作目录中。我仍然收到 Unable to attach test_reporter to test fraemwork 消息

版本: Ubuntu 11 ruby 矿 3.2

最佳答案

我终于让它工作了。 主要是通过更改菜单下的内容:
运行 -> 编辑配置 -> 单击 Rspec -> 创建新配置。

对于新配置,确保 specs 文件夹指向应用程序规范模型。

最后一步(实际上让它工作的那一步)是将工作目录(仍在运行/调试配置屏幕上)设置为我的应用程序根目录!

我还做过的另一件事是将 gem 'test-unit' 添加到 Gemfile 并当然将其捆绑。但是后来的测试(删除它并取消捆绑)表明不需要它,实际上是让测试在空套件中运行多次(可能尝试默认的 unit::test 以及运行 rspec)。

关于ruby-on-rails - ruby 矿 'Unable to attach test reporter to test framework',我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7539232/

相关文章:

c++ - 更改模型后 QTableView 中的项目数量保持不变

laravel - 我应该如何在 Laravel 包中输入提示 UserModel?

ruby-on-rails - rails + 设计 : Update user with or without pasword

ruby-on-rails - 如何编写rails路由以在路径中使用主要和次要版本映射版本化API,例如/api/v1.2/users/1234

model - 在 Ember 中将模型属性插入到 Img 元素 URL

node.js - 模拟 Typeorm QueryBuilder

c++ - 如何使用 Google Test 将单一测试应用于所有子类?

ruby-on-rails - Rails 选择 GROUP 中 COUNT 最高的对象

ruby-on-rails - Rails 用户个人资料页面只能由正确的用户访问

testing - TestNG DataProvider 从 testng.xml 配置文件读取测试数据?