编辑:这个问题有时只会发生,
这似乎只有在我从TextMate内部运行测试时才会发生(即使当我指定ruby来手动运行它时也是如此)。如果我从终端运行它,那么所有的东西都是…。
下面是一些代码:
require 'test/unit'
require 'shoulda'
class TestingTest < Test::Unit::TestCase
context "My thing" do
should "always have this test fail, and give me this message" do
assert false
end
end
end我希望它能告诉我如下:
1) Failure:
test: My thing should always have this test fail, and give me this message (TestingTest)
# etc
An assert message, if one was given但我得到了:
1) Failure:
test:8
Failed assertion, no message given.那我错过了什么?上面的示例代码非常简单,我认为我可以做到,但我看不到问题所在!
发布于 2010-08-30 19:19:00
尝试从ActiveSupport::TestCase继承而不是Test::Unit::TestCase
https://stackoverflow.com/questions/3602069
复制相似问题