Minitest is already in the standard library, so you’re not really
adding or removing any meaningful dependence.
I just found this thread after noticing the same dependency today and looking for a way to potentially remove this. I don’t quite see a dependency on minitest in the ‘standard library’ (by which I assume you mean the Rails gem itself). https://github.com/rails/rails/blob/master/rails.gemspec Or is there another dependency I’m missing?
When Steve wrote that sentence three+ years ago, minitest was still included as part of the Ruby standard library. It was removed in 2.2 - see this discussion for more details:
As far as I can tell we would need to not autoload test_case.rb and then wrap the ‘require’ call to give a more meaningful error. It’s not clear to me if we expect consumers of the gem to use the ActiveSupport::TestCase class, or is that purely for testing the library itself? I don’t see any explicit examples for it in the documentation, but I’m also not that familiar with MiniTest.
ActiveSupport::TestCase can be used directly (see the example in the guides: http://guides.rubyonrails.org/testing.html#rails-meets-minitest ). The minitest plumbing is also used by Rspec (in at least some cases):
I’ll reiterate Rafael’s point from earlier in the thread: why is removing this dependency important?