Skip to content

Commit c3e8fdd

Browse files
author
Joshua Hoblitt
committed
improve contexts in pureftpd::config rspec
1 parent d50e2af commit c3e8fdd

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

spec/classes/config_spec.rb

+10-8
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,22 @@
8282

8383
# accumutate all of the params and content strings as we test each individual
8484
# option so we can use them for the next test
85-
config_options.each do |option|
86-
params = {}
87-
params[option.downcase.to_sym] = value
88-
content = sprintf("%-19s %s\n", option, value)
85+
context 'one option at a time' do
86+
config_options.each do |option|
87+
params = {}
88+
params[option.downcase.to_sym] = value
89+
content = sprintf("%-19s %s\n", option, value)
8990

90-
all_params.merge!(params)
91-
all_content += content
91+
all_params.merge!(params)
92+
all_content += content
9293

93-
it_behaves_like 'config', params, content
94+
it_behaves_like 'config', params, content
95+
end
9496
end
9597

9698
# test all of the known options at once this works because the ordering of
9799
# options values in the output file is fixed
98-
context 'all parameters' do
100+
context 'all options' do
99101
it_behaves_like 'config', all_params, all_content
100102
end
101103

0 commit comments

Comments
 (0)