Skip to content

Commit b428ec8

Browse files
jrussettgeofffranks
authored andcommitted
Rspec lint the gorouter template tests
In #331, we added some new template tests. They pass but contained some minor linting issues. Fixes: ``` spec/gorouter_templates_spec.rb:176:45: C: [Correctable] Style/WordArray: Use %w or %W for an array of words. 'hop_by_hop_headers_to_filter' => ["X-ME", "X-Foo"], ^^^^^^^^^^^^^^^^^ spec/gorouter_templates_spec.rb:176:46: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. 'hop_by_hop_headers_to_filter' => ["X-ME", "X-Foo"], ^^^^^^ spec/gorouter_templates_spec.rb:176:54: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. 'hop_by_hop_headers_to_filter' => ["X-ME", "X-Foo"], ^^^^^^^ spec/gorouter_templates_spec.rb:374:69: C: [Correctable] Style/WordArray: Use %w or %W for an array of words. expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(["X-ME","X-Foo"]) ^^^^^^^^^^^^^^^^ spec/gorouter_templates_spec.rb:374:70: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(["X-ME","X-Foo"]) ^^^^^^ spec/gorouter_templates_spec.rb:374:76: C: [Correctable] Layout/SpaceAfterComma: Space missing after comma. expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(["X-ME","X-Foo"]) ^ spec/gorouter_templates_spec.rb:374:77: C: [Correctable] Style/StringLiterals: Prefer single-quoted strings when you don't need string interpolation or special symbols. expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(["X-ME","X-Foo"]) ```
1 parent 013c118 commit b428ec8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spec/gorouter_templates_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@
173173
'enable_proxy' => false,
174174
'force_forwarded_proto_https' => false,
175175
'sanitize_forwarded_proto' => false,
176-
'hop_by_hop_headers_to_filter' => ["X-ME", "X-Foo"],
176+
'hop_by_hop_headers_to_filter' => %w[X-ME X-Foo],
177177
'suspend_pruning_if_nats_unavailable' => false,
178178
'max_idle_connections' => 100,
179179
'keep_alive_probe_interval' => '1s',
@@ -371,7 +371,7 @@
371371

372372
describe 'hop_by_hop_headers_to_filter' do
373373
it 'should set hop_by_hop_headers_to_filter' do
374-
expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(["X-ME","X-Foo"])
374+
expect(parsed_yaml['hop_by_hop_headers_to_filter']).to eq(%w[X-ME X-Foo])
375375
end
376376
end
377377

0 commit comments

Comments
 (0)