summaryrefslogtreecommitdiff
path: root/rubocop/spec_helpers.rb
diff options
context:
space:
mode:
authorToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
committerToon Claes <toon@gitlab.com>2019-02-28 19:57:34 +0100
commit62d7990b9bb30cf33ed87017c5c633d1cccc75c2 (patch)
treec3e1b69c58a412ba1c6f50a0337a23d9f9d6e1a4 /rubocop/spec_helpers.rb
parentf6453eca992a9c142268e78ac782cef98110d183 (diff)
downloadgitlab-ce-tc-standard-gem.tar.gz
Ran standardrb --fix on the whole codebasetc-standard-gem
Inspired by https://twitter.com/searls/status/1101137953743613952 I decided to try https://github.com/testdouble/standard on our codebase. It's opinionated, but at least it's a _standard_.
Diffstat (limited to 'rubocop/spec_helpers.rb')
-rw-r--r--rubocop/spec_helpers.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/rubocop/spec_helpers.rb b/rubocop/spec_helpers.rb
index 63c1b975a65..ac015592300 100644
--- a/rubocop/spec_helpers.rb
+++ b/rubocop/spec_helpers.rb
@@ -1,20 +1,20 @@
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
+ MIGRATION_SPEC_DIRECTORIES = ["spec/migrations", "spec/lib/gitlab/background_migration"].freeze
# Returns true if the given node originated from the spec directory.
def in_spec?(node)
path = node.location.expression.source_buffer.name
!SPEC_HELPERS.include?(File.basename(path)) &&
- path.start_with?(File.join(Dir.pwd, 'spec'), File.join(Dir.pwd, 'ee', 'spec'))
+ path.start_with?(File.join(Dir.pwd, "spec"), File.join(Dir.pwd, "ee", "spec"))
end
def migration_directories
- @migration_directories ||= MIGRATION_SPEC_DIRECTORIES.map do |dir|
- [File.join(Dir.pwd, dir), File.join(Dir.pwd, 'ee', dir)]
- end.flatten
+ @migration_directories ||= MIGRATION_SPEC_DIRECTORIES.map { |dir|
+ [File.join(Dir.pwd, dir), File.join(Dir.pwd, "ee", dir)]
+ }.flatten
end
# Returns true if the given node originated from a migration spec.