File: 0009-skip-some-config-specs-with-ruby2.7.patch

package info (click to toggle)
yard 0.9.37-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 5,720 kB
  • sloc: ruby: 31,354; javascript: 7,608; makefile: 21
file content (32 lines) | stat: -rw-r--r-- 1,361 bytes parent folder | download | duplicates (2)
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
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Wed, 26 Feb 2020 22:21:56 +0100
Subject: skip some config specs with ruby2.7

waiting for more investigation with rspec, bundler and ruby2.7
(e.g https://github.com/rspec/rspec-mocks/issues/1317)
---
 spec/config_spec.rb | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/spec/config_spec.rb b/spec/config_spec.rb
index b592ce4..8f16120 100644
--- a/spec/config_spec.rb
+++ b/spec/config_spec.rb
@@ -26,7 +26,7 @@ RSpec.describe YARD::Config do
       end
       YARD::Config.load
       expect(YARD::Config.options[:test]).to be true
-    end
+    end unless /ruby2\.7/ =~ RbConfig.ruby
 
     it "ignores any plugins specified in '~/.yard/ignored_plugins'" do
       expect(File).to receive(:file?).with(YARD::Config::CONFIG_FILE).and_return(false)
@@ -157,7 +157,7 @@ RSpec.describe YARD::Config do
       expect(YARD::Config).to receive(:load_plugin).with('yard_plugin').and_return(false)
       expect(YARD::Config).to receive(:load_plugin).with('yard-plugin').and_return(true)
       expect(YARD::Config.load_plugins).to be true
-    end
+    end unless /ruby2\.7/ =~ RbConfig.ruby
 
     it "logs an error if a gem raises an error" do
       allow(YARD::Config).to receive(:options).and_return(:load_plugins => true, :ignored_plugins => [], :autoload_plugins => [])