module FlexMock::Minitest
Minitest::Test Integration.
Include this module in any Test subclass (in test-style minitest) or or describe block (in spec-style minitest) to get integration with FlexMock. When this module is included, the mock container methods (e.g. flexmock(), flexstub()) will be available.
Public Instance Methods
after_teardown()
click to toggle source
# File lib/flexmock/minitest_integration.rb, line 53 def after_teardown if @flexmock_teardown_failure raise @flexmock_teardown_failure end end
before_teardown()
click to toggle source
Teardown the test case, verifying any mocks that might have been defined in this test case.
Calls superclass method
# File lib/flexmock/minitest_integration.rb, line 37 def before_teardown super @flexmock_teardown_failure = nil if respond_to?(:capture_exceptions) capture_exceptions do flexmock_teardown end else begin flexmock_teardown rescue Exception => e @flexmock_teardown_failure = e end end end