Package: ruby-mechanize / 2.3-2

set_path_for_test Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
Author: Gunnar Wolf <gwolf@debian.org>
Last-Update: 2012-01-23
Forwarded: Not-needed
Description: Fix the provided path for te tests
 lib/mechanize/test_case.rb assumes the tests are run inside a
 Gems-installed system, and fails to find the tests' data. Fix it by
 setting the right path for our build environment.

Index: ruby-mechanize/lib/mechanize/test_case.rb
===================================================================
--- ruby-mechanize.orig/lib/mechanize/test_case.rb	2012-01-17 17:18:15.000000000 -0600
+++ ruby-mechanize/lib/mechanize/test_case.rb	2012-01-23 11:29:18.000000000 -0600
@@ -16,7 +16,9 @@
 
 class Mechanize::TestCase < MiniTest::Unit::TestCase
 
-  TEST_DIR = File.expand_path '../../../test', __FILE__
+  # Test directory changed to what matches the Debian build process
+  # TEST_DIR = File.expand_path '../../../test', __FILE__
+  TEST_DIR = File.expand_path (Dir.pwd + '/test')
   REQUESTS = []
 
   def setup