Package: ruby-rspec-rails / 4.0.1-2

dont_check_whitespace_for_debian_dir.patch Patch series | download
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
From: =?utf-8?q?C=C3=A9dric_Boutillier?= <boutil@debian.org>
Date: Fri, 7 Feb 2020 18:19:24 +0100
Subject: fix whitespace check

Last-Update: 2016-03-02
Forwarded: not-needed

 - do not use git to list all the files
 - exclude files in the debian directory
---
 spec/rspec/rails_spec.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/spec/rspec/rails_spec.rb b/spec/rspec/rails_spec.rb
index 2e1867e..004d8d3 100644
--- a/spec/rspec/rails_spec.rb
+++ b/spec/rspec/rails_spec.rb
@@ -17,7 +17,7 @@ RSpec.describe "RSpec::Rails" do
 
   it "has no malformed whitespace", :slow do
     error_messages = []
-    `git ls-files -z`.split("\x0").each do |filename|
+    Dir.glob("**/*").select { |f| !(f =~ /^debian/) && File.file?(f)}.each do |filename|
       error_messages << check_for_tab_characters(filename)
       error_messages << check_for_extra_spaces(filename)
     end