How to run all tests with minitest?

后端 未结 9 2230
-上瘾入骨i
-上瘾入骨i 2020-12-02 21:47

I downloaded source code for a project, found a bug, and fixed it.

Now I want to run tests to find out if I have broken anything.

The Tests are in minitest D

9条回答
  •  隐瞒了意图╮
    2020-12-02 22:37

    This is what Rake::TestTask does under the hood, more or less:

    ruby -Ilib -e 'ARGV.each { |f| require f }' ./test/test*.rb
    

    Note: lib & test/test*.rb (above) are the defaults but test & test/*_test.rb, respectively, are more typical.

    Source: rake/testtask.rb at c34d9e0 line 169

    If you're using JRuby and want to avoid paying the startup cost twice (once for Rake and then once for the subprocess that Rake starts), just use that command.

提交回复
热议问题