我想运行一个测试文件:
# xxx.rb
require 'test/unit'; class XTest < Test::Unit::TestCase; def test_xxx; end; end
直到红宝石 1.9.2
ruby -Itest -e "require './xxx.rb'" - -v
完成了这项工作,使用 1.9.3 我突然得到:
/usr/local/rvm/rubies/ruby-1.9.3-rc1/lib/ruby/1.9.1/test/unit.rb:167:in
`block in non_options': file not found: - (ArgumentError)
(它试图加载不存在的文件'-')
任何想法如何恢复详细模式/将选项传递给 test::unit ?
正确的输出如下所示:
Loaded suite -e
Started
test_xxx(XTest): .