views:

41

answers:

1

edit: this problem only happens sometimes

This only appears to happen when I run the test from within TextMate (even when I specify the ruby to run it from by hand with a shebang). If I run it from the terminal then everything is peachy…


Here's some code:

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

I'm expecting it to tell me something like:

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

But I'm getting:

1) Failure:
test:8
Failed assertion, no message given.

So what am I missing? The example code above is as simple as I think I can make it and I can't see the problem!

A: 

try inheriting from ActiveSupport::TestCase instead of the Test::Unit::TestCase

Jed Schneider