Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I stop Minitest?

In Ruby 1.9.1, I find that ctrl + c only kills a single unit test, and you can't stop the running of the entire testing program that way.

By contrast, under test/unit in Ruby 1.8, it stops all the tests.

Sample progress bar under 1.9.1:

ruby1.9.1 test/ts_foo.rb 
Loaded suite test/ts_foo
Started

..............................^CF..............................................................................^CE..................^C^C^CE..E..^C^C^C^CEE^CE^CE^CE^CE^C^C^CEE^CE^CE^CE^CE^CE^CE..^CE...^C..E..^C.E......^CE..^CE.......^C^C^CE.E.^CE^CE^C^CE^CE..^C.E...^CE.^CE..^CE...^C.E..^C.E..^C.E..^CE...^CE....^CE..............

And under 1.8.7:

$ ruby test/ts_foo.rb 
Loaded suite test/ts_foo
Started

........................................................^C.

I'm running this on Ubuntu Karmic Koala, and the Ruby versions are

$ ruby1.9.1 --version
ruby 1.9.1p243 (2009-07-16 revision 24175) [x86_64-linux]
$ ruby --version
ruby 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]
like image 605
Andrew Grimm Avatar asked Mar 11 '26 13:03

Andrew Grimm


1 Answers

It appears that ruby-1.9.1 includes a very ancient version of minitest. This (unusual) behavior has been fixed quite a while ago: minitest commit.

The solution might be either to switch to later 1.9 version (ruby-1.9.2's minitest does include that fix) or to upgrade local ruby-1.9.1 minitest (either manually or hopefully just by installing latest minitest gem).

like image 105
sinjed Avatar answered Mar 14 '26 04:03

sinjed



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!