summary refs log tree commit diff
path: root/gnu/packages/ruby.scm
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2023-07-01 09:34:40 +0100
committerChristopher Baines <mail@cbaines.net>2023-07-10 08:26:03 +0100
commit6f57245943f7f4a43424cda265e844d1e5a59e91 (patch)
treea2a47f80f714954aaddf1909c8660a5e3fa783a9 /gnu/packages/ruby.scm
parentd3d4cdf26096f306b8c73286a9ce5e640c1b51af (diff)
downloadguix-6f57245943f7f4a43424cda265e844d1e5a59e91.tar.gz
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.
Diffstat (limited to 'gnu/packages/ruby.scm')
-rw-r--r--gnu/packages/ruby.scm31
1 files changed, 20 insertions, 11 deletions
diff --git a/gnu/packages/ruby.scm b/gnu/packages/ruby.scm
index 68db28eb17..137879bbc4 100644
--- a/gnu/packages/ruby.scm
+++ b/gnu/packages/ruby.scm
@@ -5424,17 +5424,26 @@ facilities supporting TDD, BDD, mocking, and benchmarking.")
                (base32
                 "03p6iban9gcpcflzp4z901s1hgj9369p6515h967ny6hlqhcf2iy"))))
     (arguments
-     `(#:phases
-       (modify-phases %standard-phases
-         (add-after 'unpack 'remove-unsupported-method
-           (lambda _
-             (substitute* "Rakefile"
-               (("self\\.rubyforge_name = .*") ""))))
-         (add-after 'build 'exclude-failing-tests
-           (lambda _
-             ;; Some tests are failing on Ruby 2.4 due to the deprecation of
-             ;; Fixnum.
-             (delete-file "test/minitest/test_minitest_spec.rb"))))))))
+     (list
+      #:phases
+      #~(modify-phases %standard-phases
+          (add-after 'unpack 'remove-unsupported-method
+            (lambda _
+              (substitute* "Rakefile"
+                (("self\\.rubyforge_name = .*") ""))))
+          (add-after 'build 'patch-tests
+            (lambda _
+              ;; test_no_method_error_on_unexpected_methods
+              ;; 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
   (package