gnu: ruby-minitest-4: Fix build.

* gnu/packages/ruby.scm (ruby-minitest-4)[arguments]: Patch a failing test and
update style.
[native-inputs]: Add ruby-minitest.
This commit is contained in:
Christopher Baines 2023-07-01 09:34:40 +01:00
parent d3d4cdf260
commit 6f57245943
No known key found for this signature in database
GPG key ID: 5E28A33B0B84F577

View file

@ -5424,17 +5424,26 @@ (define-public ruby-minitest-4
(base32 (base32
"03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy")))) "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
(arguments (arguments
`(#:phases (list
(modify-phases %standard-phases #:phases
(add-after 'unpack 'remove-unsupported-method #~(modify-phases %standard-phases
(lambda _ (add-after 'unpack 'remove-unsupported-method
(substitute* "Rakefile" (lambda _
(("self\\.rubyforge_name = .*") "")))) (substitute* "Rakefile"
(add-after 'build 'exclude-failing-tests (("self\\.rubyforge_name = .*") ""))))
(lambda _ (add-after 'build 'patch-tests
;; Some tests are failing on Ruby 2.4 due to the deprecation of (lambda _
;; Fixnum. ;; test_no_method_error_on_unexpected_methods
(delete-file "test/minitest/test_minitest_spec.rb")))))))) ;; This test fails due to some extra information in the message
(substitute* "test/minitest/test_minitest_mock.rb"
(("assert_equal expected, e.message")
"assert_equal expected, e.message.lines.first.strip"))
;; Some tests are failing on Ruby 2.4 due to the deprecation of
;; Fixnum.
(delete-file "test/minitest/test_minitest_spec.rb"))))))
(native-inputs
(list ruby-minitest
ruby-hoe))))
(define-public ruby-minitest-around (define-public ruby-minitest-around
(package (package