Module: Hotch::Memory::Minitest
- Defined in:
- lib/hotch/memory/minitest.rb
Class Method Summary collapse
- .aggregate(**options) ⇒ Object
-
.run(**options) ⇒ Object
Usage in test/test_helper.rb:.
Class Method Details
.aggregate(**options) ⇒ Object
18 19 20 21 22 23 24 25 26 27 |
# File 'lib/hotch/memory/minitest.rb', line 18 def self.aggregate(**) Module.new do define_method(:run_one_method) do |*args| [:aggregate] = true Hotch.memory(**) do super(*args) end end end end |
.run(**options) ⇒ Object
Usage in test/test_helper.rb:
require 'hotch/memory/minitest'
Hotch::Memory::Minitest.run
Hotch::Memory::Minitest.run(name: "my name")
14 15 16 |
# File 'lib/hotch/memory/minitest.rb', line 14 def self.run(**) ::Minitest.singleton_class.prepend Hotch::Memory::Minitest.aggregate(**) end |