diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-26 06:08:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-05-26 06:08:02 +0300 |
commit | 76784ebd4ac1aa8469c8ea42a5086debeb3102bb (patch) | |
tree | b2d0596568f2cb44f5ec9fdb653f4e7d568cf98f /spec/rubocop | |
parent | 3174adc79907c808088a4ede8b891facb9142025 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/inject_enterprise_edition_module_spec.rb | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb b/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb index 3cb1dbbbc2c..f047baa3bc2 100644 --- a/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb +++ b/spec/rubocop/cop/inject_enterprise_edition_module_spec.rb @@ -170,6 +170,20 @@ describe RuboCop::Cop::InjectEnterpriseEditionModule do SOURCE end + it 'does not flag the use of `prepend_if_ee EE` as long as all injections are at the end of the file' do + expect_no_offenses(<<~SOURCE) + class Foo + end + + Foo.include_if_ee('EE::Foo') + Foo.prepend_if_ee('EE::Foo') + + Foo.include(Bar) + # comment on prepending Bar + Foo.prepend(Bar) + SOURCE + end + it 'autocorrects offenses by just disabling the Cop' do source = <<~SOURCE class Foo |