[DRE-commits] [ruby-rufus-scheduler] 04/05: Make tests run
Balasankar C
balasankarc-guest at moszumanska.debian.org
Tue Dec 8 15:25:02 UTC 2015
This is an automated email from the git hooks/post-receive script.
balasankarc-guest pushed a commit to branch master
in repository ruby-rufus-scheduler.
commit cff8190ba06b298b50ecc35b3a0a7826e93faede
Author: Balasankar C <balasankarc at autistici.org>
Date: Tue Dec 8 12:39:58 2015 +0530
Make tests run
---
debian/patches/fix-tests.patch | 24 ++++++++++++++++++++++++
debian/patches/series | 1 +
2 files changed, 25 insertions(+)
diff --git a/debian/patches/fix-tests.patch b/debian/patches/fix-tests.patch
new file mode 100644
index 0000000..26eb1b5
--- /dev/null
+++ b/debian/patches/fix-tests.patch
@@ -0,0 +1,24 @@
+Description: Patch tests to fix current month dependency
+ One of the tests were using the expression `current month + 1` inside a time
+ parser function, which resulted in an error if current month was 12 (i.e Dec)
+Author: Balasankar C <balasankarc at autistici.org>
+Bug: https://github.com/jmettraux/rufus-scheduler/issues/182
+Applied-Upstream: https://github.com/jmettraux/rufus-scheduler/pull/183
+Last-Update: 2015-12-08
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/spec/job_cron_spec.rb
++++ b/spec/job_cron_spec.rb
+@@ -108,7 +108,11 @@
+ it 'returns the next trigger time' do
+
+ n = Time.now
+- nt = Time.parse("#{n.year}-#{n.month + 1}-01")
++ if n.month == 12
++ nt = Time.parse("#{n.year + 1}-01-01")
++ else
++ nt = Time.parse("#{n.year}-#{n.month + 1}-01")
++ end
+
+ expect(
+ @scheduler.schedule_cron('* * 1 * *', lambda {}).next_time
diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d04b329
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+fix-tests.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-rufus-scheduler.git
More information about the Pkg-ruby-extras-commits
mailing list