1
測試::單位我想運行一個測試文件:紅寶石:如何通過選項1.9.3
# 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?
正確的輸出將如下所示:
ruby -Itest -e "require './xxx.rb'" -- -v
或像這樣(沒有破折號,沒有要求):
ruby -Itest xxx.rb -v
Loaded suite -e
Started
test_xxx(XTest): .