diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 00:08:22 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-29 00:08:22 +0300 |
commit | d7b136d5471b5925ff784f78b9c11ec63c2a3549 (patch) | |
tree | 6c4417fb367459613e84a2d34625abccd13e6405 /spec/rubocop/cop/active_record_association_reload_spec.rb | |
parent | 1ec60cf53bc498b12c597ff0d91434a1bdb7cba9 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop/cop/active_record_association_reload_spec.rb')
-rw-r--r-- | spec/rubocop/cop/active_record_association_reload_spec.rb | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/spec/rubocop/cop/active_record_association_reload_spec.rb b/spec/rubocop/cop/active_record_association_reload_spec.rb index 3cd7a35f12f..d9c8069f0c3 100644 --- a/spec/rubocop/cop/active_record_association_reload_spec.rb +++ b/spec/rubocop/cop/active_record_association_reload_spec.rb @@ -11,7 +11,7 @@ describe RuboCop::Cop::ActiveRecordAssociationReload do context 'when using ActiveRecord::Base' do it 'registers an offense on reload usage' do - expect_offense(<<~PATTERN.strip_indent) + expect_offense(<<~PATTERN) users = User.all users.reload ^^^^^^ Use reset instead of reload. For more details check the https://gitlab.com/gitlab-org/gitlab-foss/issues/60218. @@ -19,7 +19,7 @@ describe RuboCop::Cop::ActiveRecordAssociationReload do end it 'does not register an offense on reset usage' do - expect_no_offenses(<<~PATTERN.strip_indent) + expect_no_offenses(<<~PATTERN) users = User.all users.reset PATTERN @@ -28,7 +28,7 @@ describe RuboCop::Cop::ActiveRecordAssociationReload do context 'when using ActiveRecord::Relation' do it 'registers an offense on reload usage' do - expect_offense(<<~PATTERN.strip_indent) + expect_offense(<<~PATTERN) user = User.new user.reload ^^^^^^ Use reset instead of reload. For more details check the https://gitlab.com/gitlab-org/gitlab-foss/issues/60218. @@ -36,7 +36,7 @@ describe RuboCop::Cop::ActiveRecordAssociationReload do end it 'does not register an offense on reset usage' do - expect_no_offenses(<<~PATTERN.strip_indent) + expect_no_offenses(<<~PATTERN) user = User.new user.reset PATTERN @@ -45,14 +45,14 @@ describe RuboCop::Cop::ActiveRecordAssociationReload do context 'when using on self' do it 'registers an offense on reload usage' do - expect_offense(<<~PATTERN.strip_indent) + expect_offense(<<~PATTERN) reload ^^^^^^ Use reset instead of reload. For more details check the https://gitlab.com/gitlab-org/gitlab-foss/issues/60218. PATTERN end it 'does not register an offense on reset usage' do - expect_no_offenses(<<~PATTERN.strip_indent) + expect_no_offenses(<<~PATTERN) reset PATTERN end |