module Hotch::Memory::Minitest
Public Class Methods
aggregate(**options)
click to toggle source
Calls superclass method
# File lib/hotch/memory/minitest.rb, line 18 def self.aggregate(**options) Module.new do define_method(:run_one_method) do |*args| options[:aggregate] = true Hotch.memory(**options) do super(*args) end end end end
run(**options)
click to toggle source
Usage in test/test_helper.rb:
require 'hotch/memory/minitest' Hotch::Memory::Minitest.run Hotch::Memory::Minitest.run(name: "my name")
# File lib/hotch/memory/minitest.rb, line 14 def self.run(**options) ::Minitest.singleton_class.prepend Hotch::Memory::Minitest.aggregate(**options) end