File tree Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Expand file tree Collapse file tree 4 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 128
128
let ( :cop_config ) { { 'EnforcedStyle' => 'arguments' } }
129
129
130
130
context 'when using Rails.root.join with some path strings' do
131
- it 'does not registers an offense' do
131
+ it 'does not register an offense' do
132
132
expect_no_offenses ( "Rails.root.join('app', 'models', 'user.rb')" )
133
133
end
134
134
end
135
135
136
136
context 'when using Rails.root.join in string interpolation of argument' do
137
- it 'does not registers an offense' do
137
+ it 'does not register an offense' do
138
138
expect_no_offenses ( <<~'RUBY' )
139
139
'system "rm -rf #{Rails.root.join(\'a\', \'b.png\')}"'
140
140
RUBY
150
150
end
151
151
152
152
context 'when using string interpolation without Rails.root' do
153
- it 'does not registers an offense' do
153
+ it 'does not register an offense' do
154
154
expect_no_offenses ( <<~'RUBY' )
155
155
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?('/')
156
156
RUBY
157
157
end
158
158
end
159
159
160
160
context 'when using File::SEPARATOR string without Rails.root' do
161
- it 'does not registers an offense' do
161
+ it 'does not register an offense' do
162
162
expect_no_offenses ( <<~'RUBY' )
163
163
"#{42}/"
164
164
RUBY
Original file line number Diff line number Diff line change 51
51
end
52
52
53
53
context 'when using Rails 4.2 or older' , :rails42 do
54
- it 'does not registers an offense' do
54
+ it 'does not register an offense' do
55
55
expect_no_offenses ( <<~RUBY )
56
56
x.#{ method } { |a| a[:foo] }
57
57
RUBY
Original file line number Diff line number Diff line change 238
238
)
239
239
end
240
240
241
- it 'does not registers an offense' do
241
+ it 'does not register an offense' do
242
242
expect_no_offenses ( <<~RUBY )
243
243
unless foo.blank?
244
244
something
Original file line number Diff line number Diff line change 50
50
RUBY
51
51
end
52
52
53
- it 'does not registers an offense when using `assert_not` ' \
53
+ it 'does not register an offense when using `assert_not` ' \
54
54
'with a single argument' do
55
55
expect_no_offenses ( <<~RUBY )
56
56
assert_not foo
57
57
RUBY
58
58
end
59
59
60
- it 'does not registers an offense when using `assert_not` ' \
60
+ it 'does not register an offense when using `assert_not` ' \
61
61
'with a multiple arguments' do
62
62
expect_no_offenses ( <<~RUBY )
63
63
assert_not foo, bar, baz
103
103
RUBY
104
104
end
105
105
106
- it 'does not registers an offense when using `refute` ' \
106
+ it 'does not register an offense when using `refute` ' \
107
107
'with a single argument' do
108
108
expect_no_offenses ( <<~RUBY )
109
109
refute foo
110
110
RUBY
111
111
end
112
112
113
- it 'does not registers an offense when using `refute` ' \
113
+ it 'does not register an offense when using `refute` ' \
114
114
'with a multiple arguments' do
115
115
expect_no_offenses ( <<~RUBY )
116
116
refute foo, bar, baz
You can’t perform that action at this time.
0 commit comments