Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 00:08:18 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-12-02 00:08:18 +0300
commit61666f277a484725307ae2b34697b13a300b2129 (patch)
tree01f93083ca2cb9d0eeca1443a23c31a4bdbd5532 /spec/rubocop
parent4e3a998b8ec1351d8345863f6cad4b9bd497bd6a (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r--spec/rubocop/cop/performance/readlines_each_spec.rb4
1 files changed, 2 insertions, 2 deletions
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