From dd79824022df76494e5add3c920fc04a60546e0e Mon Sep 17 00:00:00 2001 From: Arnstein Ressem Date: Tue, 8 Oct 2024 10:53:24 +0200 Subject: [PATCH] Fix tests with new ruby 3.3 and flexmock 5 --- lib/test/test_system.rb | 1 + lib/test/unit_test.rb | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/test/test_system.rb b/lib/test/test_system.rb index 9044b2ca6..fc276db1c 100644 --- a/lib/test/test_system.rb +++ b/lib/test/test_system.rb @@ -19,6 +19,7 @@ def add_metric(name, value, tag) def test_cpuutil node = flexmock('node') + node.should_receive(:file?).and_return(true) node.should_receive(:execute).times(2). and_return(IO.read(File.join(File.dirname(__FILE__), "ysar_gather_output.txt")), IO.read(File.join(File.dirname(__FILE__), "ysar_gather_output2.txt"))) diff --git a/lib/test/unit_test.rb b/lib/test/unit_test.rb index 7809e4e27..4b2957b4e 100644 --- a/lib/test/unit_test.rb +++ b/lib/test/unit_test.rb @@ -1,5 +1,6 @@ # Copyright Vespa.ai. All rights reserved. require 'assertions' +require 'test_base' class UnitTest include TestBase