Is it possible to run a single test in MiniTest?

后端 未结 13 1620
旧时难觅i
旧时难觅i 2020-12-12 10:29

I can run all tests in a single file with:

rake test TEST=path/to/test_file.rb

However, if I want to run just one test in that file, how wo

13条回答
  •  眼角桃花
    2020-12-12 11:11

    I'm looking for similar functionality to:

    rspec path/to/test_file.rb -l 25

    There is a gem that does exactly that: minitest-line.

    gem install minitest-line
    ruby test/my_file -l 5
    

    from https://github.com/judofyr/minitest-line#minitest-line

提交回复
热议问题