From: Zixing Liu <zixing.liu@canonical.com>
Date: Mon, 23 Dec 2024 16:32:28 -0300
Subject: Fixes the test expectations on Ruby 3.3

Forwarded: no
Last-Update: 2024-12-23

The SocketError got split into finer classes in Ruby 3.3
Last-Update: 2024-09-06
---
 test/test_notifier.rb | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/test/test_notifier.rb b/test/test_notifier.rb
index cdbcf48..45b9b09 100644
--- a/test/test_notifier.rb
+++ b/test/test_notifier.rb
@@ -306,7 +306,12 @@ class TestNotifier < Test::Unit::TestCase
     end
 
     should "raise exception" do
-      assert_raise(SocketError) { @notifier.notify('Hello!') }
+      if RbConfig::CONFIG['RUBY_INSTALL_NAME'] == "ruby3.3"
+        exception = Socket::ResolutionError
+      else
+        exception = SocketError
+      end
+      assert_raise(exception) { @notifier.notify('Hello!') }
     end
 
     should "not raise exception if asked" do
