无法使测试单元启动在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屋!
查看全文