module Mocha::Integration::MiniTest::Adapter
Integrates Mocha
into recent versions of MiniTest
.
See the source code for an example of how to integrate Mocha
into a test library.
Public Class Methods
applicable_to?(mini_test_version)
click to toggle source
@private
# File lib/mocha/integration/mini_test/adapter.rb, line 15 def self.applicable_to?(mini_test_version) Gem::Requirement.new('>= 3.3.0').satisfied_by?(mini_test_version) end
description()
click to toggle source
@private
# File lib/mocha/integration/mini_test/adapter.rb, line 20 def self.description 'adapter for MiniTest gem >= v3.3.0' end
included(_mod)
click to toggle source
@private
# File lib/mocha/integration/mini_test/adapter.rb, line 25 def self.included(_mod) Mocha::ExpectationErrorFactory.exception_class = ::MiniTest::Assertion end
Public Instance Methods
after_teardown()
click to toggle source
@private
Calls superclass method
# File lib/mocha/integration/mini_test/adapter.rb, line 45 def after_teardown super mocha_teardown end
before_setup()
click to toggle source
@private
Calls superclass method
# File lib/mocha/integration/mini_test/adapter.rb, line 30 def before_setup mocha_setup super end
before_teardown()
click to toggle source
@private
Calls superclass method
# File lib/mocha/integration/mini_test/adapter.rb, line 36 def before_teardown return unless passed? assertion_counter = Integration::AssertionCounter.new(self) mocha_verify(assertion_counter) ensure super end