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 'rubocop/spec_helpers.rb')
-rw-r--r--rubocop/spec_helpers.rb16
1 files changed, 0 insertions, 16 deletions
diff --git a/rubocop/spec_helpers.rb b/rubocop/spec_helpers.rb
index b38dc3f8cdb..ecd77c4351d 100644
--- a/rubocop/spec_helpers.rb
+++ b/rubocop/spec_helpers.rb
@@ -2,7 +2,6 @@ module RuboCop
module SpecHelpers
SPEC_HELPERS = %w[fast_spec_helper.rb rails_helper.rb spec_helper.rb].freeze
MIGRATION_SPEC_DIRECTORIES = ['spec/migrations', 'spec/lib/gitlab/background_migration'].freeze
- CONTROLLER_SPEC_DIRECTORIES = ['spec/controllers', 'spec/support/shared_examples/controllers'].freeze
# Returns true if the given node originated from the spec directory.
def in_spec?(node)
@@ -27,20 +26,5 @@ module RuboCop
in_spec?(node) &&
path.start_with?(*migration_directories)
end
-
- def controller_directories
- @controller_directories ||= CONTROLLER_SPEC_DIRECTORIES.map do |dir|
- pwd = RuboCop::PathUtil.pwd
- [File.join(pwd, dir), File.join(pwd, 'ee', dir)]
- end.flatten
- end
-
- # Returns true if the given node originated from a controller spec.
- def in_controller_spec?(node)
- path = node.location.expression.source_buffer.name
-
- in_spec?(node) &&
- path.start_with?(*controller_directories)
- end
end
end