summaryrefslogtreecommitdiff
path: root/spec/bundler
diff options
context:
space:
mode:
authorFrederik Dudzik <frederik.dudzik@shopify.com>2021-10-22 10:28:30 -0700
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2021-10-29 17:13:03 +0900
commit2a90ad7aa5dd434b200f66e20a98eba645b5838b (patch)
tree9ea9b1f95974a15d7bac90baa5eabd1d3c415e3b /spec/bundler
parent27220b2fe4632f499180385e5c4c866e7740e3aa (diff)
[rubygems/rubygems] use Rubocop Lint/Debugger check rather than custom spec
We have a quality spec that check for debugger statements. Rubocop has a cop that tests for the same thing. As such it makes sense to remove the spec and activate the cop. https://github.com/rubygems/rubygems/commit/dc1eb6eec5
Diffstat (limited to 'spec/bundler')
-rw-r--r--spec/bundler/quality_spec.rb29
1 files changed, 0 insertions, 29 deletions
diff --git a/spec/bundler/quality_spec.rb b/spec/bundler/quality_spec.rb
index 08ec8bed5c..62f3722a39 100644
--- a/spec/bundler/quality_spec.rb
+++ b/spec/bundler/quality_spec.rb
@@ -3,25 +3,6 @@
require "set"
RSpec.describe "The library itself" do
- def check_for_debugging_mechanisms(filename)
- debugging_mechanisms_regex = /
- (binding\.pry)|
- (debugger)|
- (sleep\s*\(?\d+)|
- (fit\s*\(?("|\w))
- /x
-
- failing_lines = []
- each_line(filename) do |line, number|
- if line =~ debugging_mechanisms_regex && !line.end_with?("# ignore quality_spec\n")
- failing_lines << number + 1
- end
- end
-
- return if failing_lines.empty?
- "#{filename} has debugging mechanisms (like binding.pry, sleep, debugger, rspec focusing, etc.) on lines #{failing_lines.join(", ")}"
- end
-
def check_for_git_merge_conflicts(filename)
merge_conflicts_regex = /
<<<<<<<|
@@ -125,16 +106,6 @@ RSpec.describe "The library itself" do
expect(error_messages.compact).to be_well_formed
end
- it "does not include any leftover debugging or development mechanisms" do
- exempt = %r{quality_spec.rb|support/helpers|vcr_cassettes|\.md|\.ronn|index\.txt|\.5|\.1}
- error_messages = []
- tracked_files.each do |filename|
- next if filename =~ exempt
- error_messages << check_for_debugging_mechanisms(filename)
- end
- expect(error_messages.compact).to be_well_formed
- end
-
it "does not include any unresolved merge conflicts" do
error_messages = []
exempt = %r{lock/lockfile_spec|quality_spec|vcr_cassettes|\.ronn|lockfile_parser\.rb}