use*_*696 20 unit-testing ruby-on-rails jetbrains-ide rubymine rvm
当我尝试从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
Run Code Online (Sandbox Code Playgroud)
也许问题来自那条线?
/usr/local/rvm/gems/ruby-1.9.3-p392/gems/activesupport-4.0.0/lib/active_support/dependencies.rb:228:警告:嵌套重复运算符+和?被'*'取代......
模式:测试脚本 使用预加载服务器:无 Ruby参数: -e $ stdout.sync = true; $ stderr.sync = true; load($ 0 = ARGV.shift)-Itest Ruby SDK: project
但是我希望有这样的东西:

谢谢
Bor*_*aMa 15
有一个很好的教程可以在他们的在线帮助中设置RubyMine测试,这有助于我解决你描述的相同问题(for- Test::Unitstyle tests).基本上,您需要将the minitest和minitest-reportersgem 包含到项目中并添加一个调用以使用新格式的测试报告:
# Gemfile
group :test do
gem 'minitest'
gem 'minitest-reporters'
end
# test/test_helper.rb
require 'minitest/reporters'
MiniTest::Reporters.use!
Run Code Online (Sandbox Code Playgroud)
查看教程以获取更多选项.
我遇到了同样的问题,这是因为没有安装(全局?)测试库的ruby gems.例如,对于minitest测试框架(您没有指定使用哪一个),只需从命令行运行:
gem install minitest
gem install minitest-reporters
Run Code Online (Sandbox Code Playgroud)
这解决了我的问题.
从RubyMine运行时我遇到了同样的问题(但不是从命令行运行).它通过重新启动弹簧来修复:
bin/spring stop
bin/spring status
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
6258 次 |
| 最近记录: |