【发布时间】:2011-02-04 20:05:07
【问题描述】:
我收到一个非常奇怪的消息错误。我认为它不是来自 Ruby,而是来自 unix 系统。
所以,我有以下测试文件:
require File.dirname(__FILE__) + '/../test_helper'
class CatTest < ActiveSupport::TestCase
def test_truth
assert true
end
end
因此,Fixtures 目录中的 YAML 文件没有任何内容。
当我使用命令运行上面的测试时:
$ ruby ./test/unit/cat_test.rb
我得到了非常奇怪的结果:
Loaded suite ./test/unit/cat_test
Started
E
Finished in 0.011252 seconds.
1) Error:
test_truth(CatTest):
IndexError: string not matched
1 tests, 0 assertions, 0 failures, 1 errors
找不到错误的意思
IndexError: string not matched
但最奇怪的是,昨天,居然成功了!
非常感谢您的帮助。
问候
(我在 Ubuntu 9.04 下工作)
【问题讨论】:
标签: ruby-on-rails unit-testing