无法让测试单元启动在 ruby 1.9.2 中工作 [英] can't get test unit startup to work in ruby 1.9.2
本文介绍了无法让测试单元启动在 ruby 1.9.2 中工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用 Ruby 1.9.2(ruby -v 产生:ruby 1.9.2p290(2011-07-09 修订版 32553)[x86_64-linux]),我正在尝试让它工作:
I am using Ruby 1.9.2 (ruby -v yields :ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-linux]), and I am trying to get this to work:
require 'test/unit'
class TestStartup < Test::Unit::TestCase
def self.startup
puts "startup"
end
def test1
puts "in test1"
end
end
当我运行它时,我得到
Loaded suite test_startup
Started
in test1
.
Finished in 0.000395 seconds.
1 tests, 0 assertions, 0 failures, 0 errors, 0 skips
我很难找到关于此功能的文档,除了这里关于 SO 等的零散帖子.
I had a hard time finding documentation on this feature, other than scattered posts here on SO and the like.
是的,我想使用此功能而不是设置.
And yes, I want to use this feature and not setup.
TIA
推荐答案
所以你一定在使用 Test::Unit gem?可能是旧版本不支持此功能吗?
So you must be using the Test::Unit gem? Is it perhaps an older version which doesn't support this feature?
这篇关于无法让测试单元启动在 ruby 1.9.2 中工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文