File: 03_no_relative_require.patch

package info (click to toggle)
ruby-sawyer 0.7.0-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 228 kB
  • ctags: 208
  • sloc: ruby: 1,042; sh: 17; makefile: 3
file content (15 lines) | stat: -rw-r--r-- 484 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
don't use relative path for require
 - fixes autopkgtest failure

Index: ruby-sawyer/test/helper.rb
===================================================================
--- ruby-sawyer.orig/test/helper.rb
+++ ruby-sawyer/test/helper.rb
@@ -1,5 +1,6 @@
 require "minitest/autorun"
-require File.expand_path('../../lib/sawyer', __FILE__)
+$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
+require 'sawyer'
 
 class Sawyer::TestCase < Minitest::Test
   def default_test