File: 0007-fix-tests-to-work-against-installed-package.patch

package info (click to toggle)
ruby-shoulda-context 2.0.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 476 kB
  • sloc: ruby: 1,712; sh: 200; makefile: 4
file content (22 lines) | stat: -rw-r--r-- 633 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
From: Lucas Nussbaum <lucas@debian.org>
Date: Thu, 24 Apr 2025 20:31:47 +0200
Subject: fix tests to work against installed package

---
 test/test_helper.rb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/test/test_helper.rb b/test/test_helper.rb
index 0516a0f..272e10f 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -22,7 +22,8 @@ ASSERTION_CLASS =
     Minitest::Assertion
   end
 
-require_relative "../lib/shoulda/context"
+$LOAD_PATH.unshift File.expand_path("../lib", __FILE__)
+require "shoulda/context"
 
 Shoulda.autoload_macros(
   File.join(File.dirname(__FILE__), "fake_rails_root"),