Minitest #setup and #teardown not called when test run via Rake
The problem was that another test case was overwriting the setup
and teardown
methods. I had accidentally given two test cases the same class name, which is why the overwriting happened. Naturally, this error didn't happen when I ran a single test case, which explains the difference in behavior when using Rake.