Skip to content

Commit 64d42ed

Browse files
jordanbreen28jordanbreen28
authored andcommitted
(CONT-971) - Correct Style/SymbolProc
1 parent 92b5a8d commit 64d42ed

File tree

4 files changed

+3
-13
lines changed

4 files changed

+3
-13
lines changed

.rubocop_todo.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -217,16 +217,6 @@ Style/OptionalBooleanParameter:
217217
- 'tests/beaker/lib/lvm_helper.rb'
218218

219219

220-
# Offense count: 3
221-
# This cop supports unsafe autocorrection (--autocorrect-all).
222-
# Configuration parameters: AllowMethodsWithArguments, AllowedMethods, AllowedPatterns, AllowComments.
223-
# AllowedMethods: define_method
224-
Style/SymbolProc:
225-
Exclude:
226-
- 'spec/unit/puppet/provider/logical_volume/lvm_spec.rb'
227-
- 'spec/unit/puppet/provider/physical_volume/lvm_spec.rb'
228-
- 'spec/unit/puppet/provider/volume_group/lvm_spec.rb'
229-
230220
# Offense count: 1
231221
# This cop supports safe autocorrection (--autocorrect).
232222
# Configuration parameters: EnforcedStyle, AllowSafeAssignment.

spec/unit/puppet/provider/logical_volume/lvm_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
end
2525

2626
it 'returns an array of logical volumes' do
27-
logical_volumes = @provider.class.instances.map { |x| x.name }
27+
logical_volumes = @provider.class.instances.map(&:name)
2828

2929
expect(logical_volumes).to include('lv_root', 'lv_swap')
3030
end

spec/unit/puppet/provider/physical_volume/lvm_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222

2323
describe 'self.instances' do
2424
it 'returns an array of physical volumes' do
25-
physical_volumes = @provider.class.instances.map { |x| x.name }
25+
physical_volumes = @provider.class.instances.map(&:name)
2626

2727
expect(physical_volumes).to include('/dev/sda2', '/dev/sda3')
2828
end

spec/unit/puppet/provider/volume_group/lvm_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
end
2222

2323
it 'returns an array of volume groups' do
24-
volume_groups = @provider.class.instances.map { |x| x.name }
24+
volume_groups = @provider.class.instances.map(&:name)
2525

2626
expect(volume_groups).to include('VolGroup')
2727
end

0 commit comments

Comments
 (0)