blowmage/minitest-rails — pull request #80 by remiprev (2012-10-26 18:52:32+00:00)
Title: Override ActiveModel::TestCase too

This pull request adds a `MiniTest::Rails::ActiveModel::TestCase` class which contains no code but inherits from `MiniTest::Rails::ActiveSupport::TestCase` like other Rails test cases using this gem.

The reason I had to use this is because `#setup` and `#teardown` were not supported in unit tests. Easy to fix, just add `include ActiveSupport::Testing::SetupAndTeardown` and be done with it! Wrong! Adding this line in `class MiniTest::Unit::TestCase` makes unit tests work, but causes `Stack level too deep` errors for other types of test.

So, with these changes, `ActiveModel::TestCase` tests behave like other tests.

Hoping to get feedback on this since I’m not 100% familiar with `Minitest` structure and/or `ActiveModel::TestCase`, so there might be a simpler way of doing it.

Thanks!