0

編集:この問題は時々しか発生しません

これは、TextMate 内からテストを実行した場合にのみ発生するようです (ルビを指定して手動で実行する場合でも)。ターミナルから実行すると、すべてが桃色になります…</p>


ここにいくつかのコードがあります:

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.

それで、私は何が欠けていますか?上記のコード例は、私が作成できると思うほど単純で、問題がわかりません!

4

1 に答える 1

0

ActiveSupport::TestCaseTest::Unit::TestCase の代わりに継承してみてください

于 2010-08-30T19:19:00.717 に答える