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