Cannot get the launch of the test module to work in ruby ​​1.9.2

I am using Ruby 1.9.2 (ruby -v yields: ruby ​​1.9.2p290 (2011-07-09 version 32553) [x86_64-linux]) and I am trying to get this to work:

require 'test/unit' class TestStartup < Test::Unit::TestCase def self.startup puts "startup" end def test1 puts "in test1" end end 

when i run it i get

 Loaded suite test_startup Started in test1 . Finished in 0.000395 seconds. 1 tests, 0 assertions, 0 failures, 0 errors, 0 skips 

It was difficult for me to find documentation on this function, except for scattered posts here on SO, etc.

And yes, I want to use this function, not configure.

TIA

+6
source share
2 answers
+2
source

Ruby 1.9.2 uses Minitest instead of Test :: Unit by default, so it may be that this function is missing in Minitest.

+2
source

Source: https://habr.com/ru/post/898546/


All Articles