Skip to content

Commit e114a11

Browse files
Merge pull request #93 from puppetlabs/maint_fix_rubocop_warnings
(maint) Fix rubocop lint warnings
2 parents 2f259a6 + 6dae35b commit e114a11

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

lib/rspec-puppet/example/function_example_group.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ def find_function(function_name = self.class.top_level_description)
100100
return func if func.func
101101

102102
if Puppet::Parser::Functions.function(function_name)
103-
V3FunctionWrapper.new(function_name, scope.method("function_#{function_name}".intern))
103+
V3FunctionWrapper.new(function_name, scope.method(:"function_#{function_name}"))
104104
end
105105
end
106106
end

lib/rspec-puppet/matchers/create_generic.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@ def relationship_refs(resource, type, visited = Set.new)
303303

304304
# Add auto* (autorequire etc) if any
305305
if %i[before notify require subscribe].include?(type)
306-
func = "eachauto#{type}".to_sym
306+
func = :"eachauto#{type}"
307307
if resource.resource_type.respond_to?(func)
308308
resource.resource_type.send(func) do |t, b|
309309
Array(resource.to_ral.instance_eval(&b)).each do |dep|

lib/rspec-puppet/matchers/type_matchers.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def match_attrs(type, attrs, attr_type)
123123
param = param.to_sym
124124
if attr_type == :feature
125125
baddies.push(param) unless type.provider_feature(param)
126-
elsif !type.send("valid#{attr_type}?".to_sym, param)
126+
elsif !type.send(:"valid#{attr_type}?", param)
127127
baddies.push(param)
128128
end
129129
end

spec/types/valid_provider_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
[v[:baddies], v[:baddies].first].each do |baddies|
2020
it "fails for #{baddies.size} baddies" do
2121
expect do
22-
expect(subject).to be_valid_type.send("with_#{k}".to_sym, baddies)
22+
expect(subject).to be_valid_type.send(:"with_#{k}", baddies)
2323
end.to raise_error(
2424
RSpec::Expectations::ExpectationNotMetError,
2525
/Invalid #{k}: #{Array(baddies).join(',')}/
@@ -29,7 +29,7 @@
2929

3030
[v[:goodies], v[:goodies].first].each do |goodies|
3131
it "passes with #{goodies.size} goodies" do
32-
expect(subject).to be_valid_type.send("with_#{k}".to_sym, goodies)
32+
expect(subject).to be_valid_type.send(:"with_#{k}", goodies)
3333
end
3434
end
3535
end

0 commit comments

Comments
 (0)