Skip to content

Commit 1cac35a

Browse files
authored
fix: Minitest template defers calling autorun until after tests are loaded (#246)
1 parent 616e354 commit 1cac35a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

toys/lib/toys/templates/minitest.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def run # rubocop:disable all
305305
end
306306
tests.uniq!
307307
end
308-
code = ["require 'minitest/autorun'"] + tests.map { |file| "load '#{file}'" }
308+
code = tests.map { |file| "load '#{file}'" } + ["require 'minitest/autorun'"]
309309
ruby_args << "-e" << code.join("\n")
310310

311311
ruby_args << "--"

0 commit comments

Comments
 (0)