mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: ruby-options: Enable tests.
* gnu/packages/ruby-xyz.scm (ruby-options)[native-inputs]: Add ruby-rspec. [arguments]<#:tests?>: Remove field. <#:phases>{check}: Replace the default phase with manual execution of RSpec tests. Change-Id: I8d1fa7dada7af9c684528d74631bbed50ed9920e Signed-off-by: Andreas Enge <andreas@enge.fr>
This commit is contained in:
parent
a497817bfe
commit
05a1d90454
1 changed files with 14 additions and 8 deletions
|
@ -2610,14 +2610,20 @@ input and output.")
|
|||
"1s650nwnabx66w584m1cyw82icyym6hv5kzfsbp38cinkr5klh9j"))))
|
||||
(build-system ruby-build-system)
|
||||
(arguments
|
||||
'(#:tests? #f ;; TODO: NameError: uninitialized constant Config
|
||||
#:phases
|
||||
(modify-phases %standard-phases
|
||||
(add-before 'check 'set-LIB
|
||||
(lambda _
|
||||
;; This is used in the Rakefile, and setting it avoids an issue
|
||||
;; with running the tests.
|
||||
(setenv "LIB" "options"))))))
|
||||
(list
|
||||
#:phases
|
||||
#~(modify-phases %standard-phases
|
||||
(replace 'check
|
||||
(lambda* (#:key tests? #:allow-other-keys)
|
||||
(when tests?
|
||||
(substitute* "spec/options_spec.rb"
|
||||
(("require .* \"/spec_helper\"")
|
||||
"require \"spec_helper\"\n"))
|
||||
(substitute* "spec/spec_helper.rb"
|
||||
(("require 'spec'")
|
||||
"require 'rspec'\n"))
|
||||
(invoke "rspec" "spec")))))))
|
||||
(native-inputs (list ruby-rspec))
|
||||
(synopsis "Ruby library to parse options from *args cleanly")
|
||||
(description
|
||||
"The @code{options} library helps with parsing keyword options in Ruby
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue