I have a bunch of unit test files in a Rails project. One of them has stopped using the setup method before each test, or even if I invoke it in the test itself.
After commenting out most of it, here is what is left:
require 'test/test_helper'
class GlcTest < ActiveSupport::TestCase def setup p '###########################' end
def test_setup p '[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[' setup end end
The file I am testing is glc.rb, and that does get loaded. If I run the test file, it does work normally; this is a problem when running the test through rake (either via my IDE or at the command line).
test_setup does get invoked, so the file is being processed. I am guessing that somewhere there is another setup method that takes priority, but where would it be, and why does it take priority over this one? My IDE recognises that this setup overrides the one in ActiveSupport::TestCase.
There is no setup method defined in glc.rb, and as the problem is isolated to this one class, I am mystified as to where this other setup might be.
Any advice appreciated.
Using JRuby 1.5 on Windows, by the way.