File: ruby-vers-aware-tests.patch

package info (click to toggle)
ruby-simplecov 0.22.0-4
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,512 kB
  • sloc: ruby: 5,550; makefile: 10
file content (47 lines) | stat: -rw-r--r-- 1,533 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
From: Nilesh Patra <nilesh@debian.org>
Date: Fri, 27 Dec 2024 16:15:01 -0300
Subject: Run tests with right ruby version rather than /usr/bin/ruby

Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1019666
Forwarded: NO
Last-Update: 2022-12-22
---
 spec/coverage_for_eval_spec.rb | 2 +-
 spec/return_codes_spec.rb      | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/spec/coverage_for_eval_spec.rb b/spec/coverage_for_eval_spec.rb
index 7677b3a..b38b9fb 100644
--- a/spec/coverage_for_eval_spec.rb
+++ b/spec/coverage_for_eval_spec.rb
@@ -16,7 +16,7 @@ RSpec.describe "coverage for eval" do
     end
 
     context "foo" do
-      let(:command) { "ruby eval_test.rb" }
+      let(:command) { "#{RbConfig.ruby} eval_test.rb" }
 
       it "records coverage for erb" do
         expect(@stdout).to include(" 2 / 3 LOC")
diff --git a/spec/return_codes_spec.rb b/spec/return_codes_spec.rb
index e3656b3..f2e71f1 100644
--- a/spec/return_codes_spec.rb
+++ b/spec/return_codes_spec.rb
@@ -52,7 +52,7 @@ describe "return codes" do
     end
 
     context "when running testunit_good.rb" do
-      let(:command) { "ruby testunit_good.rb" }
+      let(:command) { "#{RbConfig.ruby} testunit_good.rb" }
       it_behaves_like "good tests"
     end
 
@@ -62,7 +62,7 @@ describe "return codes" do
     end
 
     context "when running testunit_bad.rb" do
-      let(:command) { "ruby testunit_bad.rb" }
+      let(:command) { "#{RbConfig.ruby} testunit_bad.rb" }
       it_behaves_like "bad tests"
     end