File: fix-path-matching-in-mo-spec-test.patch

package info (click to toggle)
ruby-fast-gettext 4.1.1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 676 kB
  • sloc: ruby: 3,209; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 853 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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