Skip to content

Commit

Permalink
+ Added minitest/manual_plugins.rb w/ new Minitest.load method. (tend…
Browse files Browse the repository at this point in the history
…erlove)

eg:
  require "minitest/autorun"
  require "minitest/manual_plugins"
  Minitest.load :pride, :gcstats
runs about 5% faster on my machine (~100 gems)

[git-p4: depot-paths = "//src/minitest/dev/": change = 14137]
  • Loading branch information
zenspider committed May 9, 2024
1 parent 6a8f348 commit b2a4b43
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions Manifest.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ lib/minitest/benchmark.rb
lib/minitest/compress.rb
lib/minitest/expectations.rb
lib/minitest/hell.rb
lib/minitest/manual_plugins.rb
lib/minitest/mock.rb
lib/minitest/parallel.rb
lib/minitest/pride.rb
Expand Down
16 changes: 16 additions & 0 deletions lib/minitest/manual_plugins.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
require "minitest"

ARGV << "--no-plugins"

module Minitest
##
# Manually load plugins by name.

def self.load *names
names.each do |name|
require "minitest/#{name}_plugin"

self.extensions << name.to_s
end
end
end

0 comments on commit b2a4b43

Please sign in to comment.