From add7208ba1f7bba30530b39a3043d2c5f134da7b Mon Sep 17 00:00:00 2001
From: Matt Brictson <matt@mattbrictson.com>
Date: Mon, 1 Apr 2024 14:08:50 -0700
Subject: [PATCH] Fix failing tests on ruby head (#533)

---
 test/unit/backends/test_abstract.rb  | 2 +-
 test/unit/test_deprecation_logger.rb | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/unit/backends/test_abstract.rb b/test/unit/backends/test_abstract.rb
index 9d8511f5..0ec8f8d7 100644
--- a/test/unit/backends/test_abstract.rb
+++ b/test/unit/backends/test_abstract.rb
@@ -124,7 +124,7 @@ def test_background_logs_deprecation_warnings
         assert_equal 2, lines.length
 
         assert_equal("[Deprecated] The background method is deprecated. Blame badly behaved pseudo-daemons!\n", lines[0])
-        assert_match(/    \(Called from.*test_abstract.rb:\d+:in `block in test_background_logs_deprecation_warnings'\)\n/, lines[1])
+        assert_match(/    \(Called from.*test_abstract.rb:\d+:in .block in .*test_background_logs_deprecation_warnings.\)\n/, lines[1])
       end
 
       def test_calling_abstract_with_undefined_execute_command_raises_exception
diff --git a/test/unit/test_deprecation_logger.rb b/test/unit/test_deprecation_logger.rb
index 54414185..fb34f82f 100644
--- a/test/unit/test_deprecation_logger.rb
+++ b/test/unit/test_deprecation_logger.rb
@@ -20,7 +20,7 @@ def test_hides_duplicate_deprecation_warnings
 
       assert_equal(2, actual_lines.size)
       assert_equal "[Deprecated] Some message\n", actual_lines[0]
-      assert_match %r{    \(Called from .*sshkit/test/unit/test_deprecation_logger.rb:#{line_number}:in `generate_warning'\)\n}, actual_lines[1]
+      assert_match %r{    \(Called from .*sshkit/test/unit/test_deprecation_logger.rb:#{line_number}:in .*generate_warning.\)\n}, actual_lines[1]
     end
 
     def test_handles_nil_output