diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-03-28 05:48:53 +0800 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-03-28 05:48:53 +0800 |
commit | f234d9f12d6a054412067b955d3b765325d4ccc6 (patch) | |
tree | 146bdd3834e7b1302ade4982aa67aee8010567db /rubocop | |
parent | 6fce4a49d53963ad68b6dcb09d04b8c2488ffb7b (diff) | |
download | gitlab-ce-f234d9f12d6a054412067b955d3b765325d4ccc6.tar.gz |
Properly handle `ee` migration specs
Diffstat (limited to 'rubocop')
-rw-r--r-- | rubocop/cop/migration/update_column_in_batches.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rubocop/cop/migration/update_column_in_batches.rb b/rubocop/cop/migration/update_column_in_batches.rb index 5461abc5ee0..b1c43393f6a 100644 --- a/rubocop/cop/migration/update_column_in_batches.rb +++ b/rubocop/cop/migration/update_column_in_batches.rb @@ -28,7 +28,7 @@ module RuboCop source_name = node.location.expression.source_buffer.name path = Pathname.new(source_name).relative_path_from(rails_root) dirname = File.dirname(path) - .sub(%r{\Adb/(migrate|post_migrate)}, 'spec/migrations') + .sub(%r{db/(migrate|post_migrate)}, 'spec/migrations') filename = File.basename(source_name, '.rb').sub(/\A\d+_/, '') File.join(dirname, "#{filename}_spec.rb") |