aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages
diff options
context:
space:
mode:
authorBen Woodcroft <donttrustben@gmail.com>2016-06-03 15:53:50 +1000
committerBen Woodcroft <donttrustben@gmail.com>2016-06-08 21:28:20 +1000
commit3cc78097457413e503e7ba004a01edc4847ae927 (patch)
tree4a75b34821a79c07c68da33e9b0fdda9a016668d /gnu/packages
parent606ee9a113a82c585abe3701d2855be3544d159b (diff)
downloadpatches-3cc78097457413e503e7ba004a01edc4847ae927.tar
patches-3cc78097457413e503e7ba004a01edc4847ae927.tar.gz
gnu: Add ruby-timecop.
* gnu/packages/ruby.scm (ruby-timecop): New variable.
Diffstat (limited to 'gnu/packages')
-rw-r--r--gnu/packages/ruby.scm36
1 files changed, 36 insertions, 0 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 212ab22eed..10c1230bda 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -3960,3 +3960,39 @@ comprehensive ORM layer for mapping records to Ruby objects and handling
associated records.")
(home-page "http://sequel.jeremyevans.net")
(license license:expat)))
+
+(define-public ruby-timecop
+ (package
+ (name "ruby-timecop")
+ (version "0.8.1")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (rubygems-uri "timecop" version))
+ (sha256
+ (base32
+ "0vwbkwqyxhavzvr1820hqwz43ylnfcf6w4x6sag0nghi44sr9kmx"))))
+ (build-system ruby-build-system)
+ (arguments
+ `(#:phases
+ (modify-phases %standard-phases
+ (add-before 'check 'set-check-rubylib
+ (lambda _
+ ;; Set RUBYLIB so timecop tests finds its own lib.
+ (setenv "RUBYLIB" "lib")
+ #t)))))
+ (native-inputs
+ `(("bundler" ,bundler)
+ ("ruby-minitest-rg" ,ruby-minitest-rg)
+ ("ruby-mocha" ,ruby-mocha)
+ ("ruby-activesupport" ,ruby-activesupport)))
+ (synopsis "Test mocks for time-dependent functions.")
+ (description
+ "Timecop provides \"time travel\" and \"time freezing\" capabilities,
+making it easier to test time-dependent code. It provides a unified method to
+mock @code{Time.now}, @code{Date.today}, and @code{DateTime.now} in a single
+call.")
+ (home-page "https://github.com/travisjeffery/timecop")
+ (license license:expat)))
+
+