Description: Fix path matching in empty.mo spec test
Author: Jérôme Charaoui
Date: Fri, 22 Nov 2024 00:26:02 -0500
Forwarded: not-needed

Support executing this test outside of the source tree.

Index: ruby-fast-gettext/spec/fast_gettext/mo_file_spec.rb
===================================================================
--- ruby-fast-gettext.orig/spec/fast_gettext/mo_file_spec.rb
+++ ruby-fast-gettext/spec/fast_gettext/mo_file_spec.rb
@@ -66,7 +66,11 @@ describe FastGettext::MoFile do
 
   describe ".empty" do
     let(:path) do
-      File.expand_path("../../lib/fast_gettext/vendor/empty.mo", __dir__)
+      begin
+        File.join(File.dirname(Gem.find_files("fast_gettext")[0]), "fast_gettext/vendor/empty.mo")
+      rescue TypeError
+        File.expand_path "../../lib/fast_gettext/vendor/empty.mo"
+      end
     end
 
     before do
