diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 15:15:59 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-04-19 15:15:59 +0300 |
commit | 2017bc90a671eac669f0114b6ef508e151409c4f (patch) | |
tree | 79bbbedede417d3ce13ae2e13dd1ad3bb069c975 /spec/rubocop | |
parent | 9450a63064cd1572f030628dbf155f5c047f28c7 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/rspec/invalid_feature_category_spec.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb b/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb index 0d2fd029a13..e5287f7105e 100644 --- a/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb +++ b/spec/rubocop/cop/rspec/invalid_feature_category_spec.rb @@ -17,7 +17,7 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t it 'flags invalid feature category in nested context' do expect_offense(<<~RUBY, valid: valid_category, invalid: invalid_category) - RSpec.describe 'foo', feature_category: :%{valid} do + RSpec.describe 'foo', feature_category: :"%{valid}" do context 'bar', foo: :bar, feature_category: :%{invalid} do ^^{invalid} Please use a valid feature category. See https://docs.gitlab.com/ee/development/feature_categorization/#rspec-examples. end @@ -27,7 +27,7 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t it 'flags invalid feature category in examples' do expect_offense(<<~RUBY, valid: valid_category, invalid: invalid_category) - RSpec.describe 'foo', feature_category: :%{valid} do + RSpec.describe 'foo', feature_category: :"%{valid}" do it 'bar', feature_category: :%{invalid} do ^^{invalid} Please use a valid feature category. See https://docs.gitlab.com/ee/development/feature_categorization/#rspec-examples. end @@ -37,9 +37,9 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t it 'does not flag if feature category is valid' do expect_no_offenses(<<~RUBY) - RSpec.describe 'foo', feature_category: :#{valid_category} do - context 'bar', feature_category: :#{valid_category} do - it 'baz', feature_category: :#{valid_category} do + RSpec.describe 'foo', feature_category: :"#{valid_category}" do + context 'bar', feature_category: :"#{valid_category}" do + it 'baz', feature_category: :"#{valid_category}" do end end end @@ -50,8 +50,8 @@ RSpec.describe RuboCop::Cop::RSpec::InvalidFeatureCategory, feature_category: :t mistyped = make_typo(valid_category) expect_offense(<<~RUBY, invalid: mistyped, valid: valid_category) - RSpec.describe 'foo', feature_category: :%{invalid} do - ^^{invalid} Please use a valid feature category. Did you mean `:%{valid}`? See [...] + RSpec.describe 'foo', feature_category: :"%{invalid}" do + ^^^^{invalid} Please use a valid feature category. Did you mean `:%{valid}`? See [...] end RUBY end |