diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-12-20 17:22:11 +0300 |
commit | 0c872e02b2c822e3397515ec324051ff540f0cd5 (patch) | |
tree | ce2fb6ce7030e4dad0f4118d21ab6453e5938cdd /spec/rubocop/cop/performance/readlines_each_spec.rb | |
parent | f7e05a6853b12f02911494c4b3fe53d9540d74fc (diff) |
Add latest changes from gitlab-org/gitlab@15-7-stable-eev15.7.0-rc42
Diffstat (limited to 'spec/rubocop/cop/performance/readlines_each_spec.rb')
-rw-r--r-- | spec/rubocop/cop/performance/readlines_each_spec.rb | 4 |
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 |