File tree 4 files changed +11
-7
lines changed
4 files changed +11
-7
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ AllCops:
9
9
- ' tmp/**/*'
10
10
- ' spec/smoke_tests/**/*.rb'
11
11
12
+ # See https://github.com/rubocop-hq/rubocop/issues/6410
13
+ Layout/AlignHash :
14
+ Enabled : false
15
+
12
16
Metrics/BlockLength :
13
17
Exclude :
14
18
- rubocop-rspec.gemspec
Original file line number Diff line number Diff line change @@ -33,8 +33,8 @@ class ExampleWording < Cop
33
33
MSG_SHOULD = 'Do not use should when describing your tests.' . freeze
34
34
MSG_IT = "Do not repeat 'it' when describing your tests." . freeze
35
35
36
- SHOULD_PREFIX = /\A should(?:n't)?\b /i
37
- IT_PREFIX = /\A it /i
36
+ SHOULD_PREFIX = /\A should(?:n't)?\b /i . freeze
37
+ IT_PREFIX = /\A it /i . freeze
38
38
39
39
def_node_matcher (
40
40
:it_description ,
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ module RuboCop
4
4
module RSpec
5
5
# Builds a YAML config file from two config hashes
6
6
class ConfigFormatter
7
- NAMESPACES = /^(RSpec|Capybara|FactoryBot|Rails)/
7
+ NAMESPACES = /^(RSpec|Capybara|FactoryBot|Rails)/ . freeze
8
8
STYLE_GUIDE_BASE_URL = 'http://www.rubydoc.info/gems/rubocop-rspec/RuboCop/Cop/RSpec/' . freeze
9
9
10
10
def initialize ( config , descriptions )
Original file line number Diff line number Diff line change @@ -4,10 +4,10 @@ module RuboCop
4
4
module RSpec
5
5
# RSpec example wording rewriter
6
6
class Wording
7
- SHOULDNT_PREFIX = /\A should(?:n't| not)\b /i
8
- SHOULDNT_BE_PREFIX = /#{ SHOULDNT_PREFIX } be\b /i
9
- ES_SUFFIX_PATTERN = /(?:o|s|x|ch|sh|z)\z /i
10
- IES_SUFFIX_PATTERN = /[^aeou]y\z /i
7
+ SHOULDNT_PREFIX = /\A should(?:n't| not)\b /i . freeze
8
+ SHOULDNT_BE_PREFIX = /#{ SHOULDNT_PREFIX } be\b /i . freeze
9
+ ES_SUFFIX_PATTERN = /(?:o|s|x|ch|sh|z)\z /i . freeze
10
+ IES_SUFFIX_PATTERN = /[^aeou]y\z /i . freeze
11
11
12
12
def initialize ( text , ignore :, replace :)
13
13
@text = text
You can’t perform that action at this time.
0 commit comments