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:
Diffstat (limited to 'spec/rubocop/cop/inject_enterprise_edition_module_spec.rb')
-rw-r--r--spec/rubocop/cop/inject_enterprise_edition_module_spec.rb14
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