RubyMine单元测试-测试框架意外退出 [英] RubyMine Unit tests - Test Framework quit unexpectedly

查看:119
本文介绍了RubyMine单元测试-测试框架意外退出的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试从RubyMine中运行测试时,出现问题.但是奇怪的是,当我从命令行运行测试时,它工作正常.

When I try to run the tests from within RubyMine I have an issue. But what is strange is that it work fine when I run the tests from the command line.

测试框架意外退出"

/usr/local/rvm/rubies/ruby-1.9.3-p392/bin/ruby -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Itest /Users/sabour/Desktop/EIP/project/test/controllers/categories_controller_test.rb
Testing started at 1:39 AM ...
Run options: --seed 14336

# Running tests:

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: warning: nested repeat operator + and ? was replaced with '*'
...

Finished tests in 2.554592s, 1.1744 tests/s, 8.6119 assertions/s.

3 tests, 22 assertions, 0 failures, 0 errors, 0 skips

Process finished with exit code 0

也许问题出在那条线上?

Maybe the problem come from that line ?

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:警告:嵌套的重复运算符+和?被替换为'*'...

/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228: warning: nested repeat operator + and ? was replaced with '*' ...

模式:测试脚本 使用预加载服务器:无 Ruby参数: -e $ stdout.sync = true; $ stderr.sync = true; load($ 0 = ARGV.shift)-Itest Ruby SDK:项目

Mode: Test script Use pre-load server: none Ruby arguments: -e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift) -Itest Ruby SDK: project

但是我很想吃这样的东西:

But I would love to have something like this:

谢谢

推荐答案

有一个不错的教程在他们的在线帮助中设置RubyMine测试,这帮助我解决了您所描述的相同问题(对于Test::Unit样式的测试).基本上,您需要在项目中包含minitestminitest-reporters宝石,并添加一个调用以使用新的测试报告格式:

There is a nice tutorial for setting up RubyMine tests in their online help, which helped me resolve the same problem as you describe (for Test::Unit-style tests). Basically you need to include the minitest and minitest-reporters gems into your project and add a call to use the new format of tests reporting:

# Gemfile
group :test do
  gem 'minitest'
  gem 'minitest-reporters'
end

# test/test_helper.rb
require 'minitest/reporters'
MiniTest::Reporters.use!

请参阅本教程以了解更多选项.

Take a look at the tutorial for more options.

这篇关于RubyMine单元测试-测试框架意外退出的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆