[DRE-commits] [ruby-timecop] 07/09: add fix_path_require.patch to use an absolute path to require timecop in tests
Cédric Boutillier
boutil at moszumanska.debian.org
Sun Aug 31 22:08:37 UTC 2014
This is an automated email from the git hooks/post-receive script.
boutil pushed a commit to branch master
in repository ruby-timecop.
commit 9b5f33d282c6b01d1a6e6423d533232a55e30aa5
Author: Cédric Boutillier <boutil at debian.org>
Date: Mon Sep 1 00:03:57 2014 +0200
add fix_path_require.patch to use an absolute path to require timecop in tests
---
debian/patches/fix_path_require.patch | 52 +++++++++++++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 53 insertions(+)
diff --git a/debian/patches/fix_path_require.patch b/debian/patches/fix_path_require.patch
new file mode 100644
index 0000000..7241d9d
--- /dev/null
+++ b/debian/patches/fix_path_require.patch
@@ -0,0 +1,52 @@
+Description: use an absolute path to the timecop library
+ instead of a relative ../lib/. The local lib/ is moved away when running
+ autopkgtest suite.
+Author: Cédric Boutillier <boutil at debian.org>
+Last-Update: 2014-08-31
+
+--- a/test/timecop_test.rb
++++ b/test/timecop_test.rb
+@@ -1,6 +1,6 @@
+ require 'date'
+ require File.join(File.dirname(__FILE__), "test_helper")
+-require File.join(File.dirname(__FILE__), '..', 'lib', 'timecop')
++require 'timecop'
+
+ class TestTimecop < Test::Unit::TestCase
+ def teardown
+--- a/test/timecop_without_date_test.rb
++++ b/test/timecop_without_date_test.rb
+@@ -1,6 +1,6 @@
+
+ require File.join(File.dirname(__FILE__), "test_helper")
+-require File.join(File.dirname(__FILE__), '..', 'lib', 'timecop')
++require 'timecop'
+
+ class TestTimecopWithoutDate < Test::Unit::TestCase
+
+--- a/test/time_stack_item_test.rb
++++ b/test/time_stack_item_test.rb
+@@ -1,6 +1,6 @@
+ require 'date'
+ require File.join(File.dirname(__FILE__), "test_helper")
+-require File.join(File.dirname(__FILE__), '..', 'lib', 'timecop')
++require 'timecop'
+
+ require 'active_support/all'
+
+--- a/test/timecop_without_date_but_with_time_test.rb
++++ b/test/timecop_without_date_but_with_time_test.rb
+@@ -1,12 +1,11 @@
+ require "test/unit"
+
+ class TestTimecopWithoutDateButWithTime < Test::Unit::TestCase
+- TIMECOP_LIB = File.join(File.dirname(__FILE__), '..', 'lib', 'timecop')
+
+ def test_loads_properly_when_time_is_required_instead_of_date
+ assert_nothing_raised do
+ require "time"
+- require TIMECOP_LIB
++ require "timecop"
+ end
+ end
+ end
diff --git a/debian/patches/series b/debian/patches/series
index 20d2f8e..2207bf0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
test_helper.rb_editing.patch
+fix_path_require.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-timecop.git
More information about the Pkg-ruby-extras-commits
mailing list