Ok, I think I understand why so many tests I run individually appear to
be broken under Ruby (and subsequently, under JRuby).
The problem is that many of the Rails libraries make irreversible
changes to core classes and libraries. They require in new classes,
modify core classes, and so on. When running all tests together, this
has a negative effect on the individuality of each test: previous tests
will have modified the runtime in ways that taint the results of
For example, if an earlier test causes extensions to be added to the
String class, later tests will see those changes and not make them on
their own. This results in those tests requiring previous test runs to
run successfully themselves; those tests can't be run individually.
I'm no testing maven, but it seems to be a fairly significant flaw that
tests can't be run individually, or that tests depend on each other for
success. Can something be done to correct this?
I can provide my growing list of tests that can't be run individually,
if it would help.