Class: Judges::Test
- Inherits:
-
Object
- Object
- Judges::Test
- Defined in:
- lib/judges/test.rb
Overview
Test.
- Author
-
Yegor Bugayenko (yegor256@gmail.com)
- Copyright
-
Copyright © 2024 Yegor Bugayenko
- License
-
MIT
Instance Method Summary collapse
-
#initialize(loog) ⇒ Test
constructor
A new instance of Test.
- #run(_opts, args) ⇒ Object
Constructor Details
#initialize(loog) ⇒ Test
Returns a new instance of Test.
33 34 35 |
# File 'lib/judges/test.rb', line 33 def initialize(loog) @loog = loog end |
Instance Method Details
#run(_opts, args) ⇒ Object
37 38 39 40 41 42 43 44 45 46 47 |
# File 'lib/judges/test.rb', line 37 def run(_opts, args) raise 'Exactly one argument required' unless args.size == 1 dir = args[0] done = Judges::Packs.new(dir).each_with_index do |p, i| p.tests.each do |t| test_one(p, t) end @loog.info("Pack ##{i} found in #{p.dir}") end @loog.info("#{done} judges tested") end |