gpt4 book ai didi

ruby-on-rails - RubyMine单元测试-测试框架意外退出

转载 作者:行者123 更新时间:2023-12-04 04:00:39 25 4
gpt4 key购买 nike

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

“测试框架意外退出”

/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

也许问题出在那条线上?

/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:项目

但是我很想拥有这样的东西:

谢谢

最佳答案

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

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

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

看一下本教程以了解更多选项。

关于ruby-on-rails - RubyMine单元测试-测试框架意外退出,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24570266/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com