module Mocha

  module Integration

    module MiniTest

      class AssertionCounter

        def initialize(test_case)
          @test_case = test_case
        end

        def increment
          @test_case._assertions += 1
        end

      end

    end

  end

end

module Mocha

  module Integration

    module MiniTest

      class AssertionCounter

        def initialize(test_case)
          @test_case = test_case
        end

        def increment
          @test_case.assert(true)
        end

      end

    end

  end

end

Use public API of MiniTest for registering assertions.
Use public API of MiniTest for registering assertions.

As suggested by @tenderlove in [1]. This reduces the dependency on
private & potentially more changeable behaviour in MiniTest and gets us
closer to the goal of not having to monkey-patch.

[1] https://github.com/freerange/mocha/issues/87#issuecomment-6747614
