From 0c872e02b2c822e3397515ec324051ff540f0cd5 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Tue, 20 Dec 2022 14:22:11 +0000 Subject: Add latest changes from gitlab-org/gitlab@15-7-stable-ee --- spec/rubocop/cop/performance/readlines_each_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'spec/rubocop/cop/performance/readlines_each_spec.rb') diff --git a/spec/rubocop/cop/performance/readlines_each_spec.rb b/spec/rubocop/cop/performance/readlines_each_spec.rb index d876cbf79a5..11e2cee9262 100644 --- a/spec/rubocop/cop/performance/readlines_each_spec.rb +++ b/spec/rubocop/cop/performance/readlines_each_spec.rb @@ -6,7 +6,7 @@ require_relative '../../../../rubocop/cop/performance/readlines_each' RSpec.describe RuboCop::Cop::Performance::ReadlinesEach do let(:message) { 'Avoid `IO.readlines.each`, since it reads contents into memory in full. Use `IO.each_line` or `IO.each` instead.' } - shared_examples_for(:class_read) do |klass| + shared_examples_for('class read') do |klass| context "and it is called as a class method on #{klass}" do it 'flags it as an offense' do leading_readline = "#{klass}.readlines(file_path)." @@ -29,7 +29,7 @@ RSpec.describe RuboCop::Cop::Performance::ReadlinesEach do context 'when reading all lines using IO.readlines.each' do %w(IO File).each do |klass| - it_behaves_like(:class_read, klass) + it_behaves_like('class read', klass) end context 'and it is called as an instance method on a return value' do -- cgit v1.2.3