Skip to content

Commit f5f2c61

Browse files
committed
add spec tests
1 parent 60d990c commit f5f2c61

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

spec/defines/instance_spec.rb

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,23 @@ class { 'redis':
4949

5050
it { is_expected.to contain_service('redis-server-app2.service').with_ensure(true).with_enable(true) }
5151
end
52+
53+
context 'with custom options' do
54+
let(:title) { 'default' }
55+
let(:params) do
56+
{
57+
config_file_orig: '/tmp/myorig.conf',
58+
custom_options: { 'myoption' => 'avalue', 'anotheroption' => 'anothervalue' },
59+
}
60+
end
61+
62+
it do
63+
is_expected.to contain_file('/tmp/myorig.conf').
64+
with_content(%r{^bind 127.0.0.1}).
65+
with_content(%r{^myoption avalue}).
66+
with_content(%r{^anotheroption anothervalue})
67+
end
68+
end
5269
end
5370
end
5471
end

0 commit comments

Comments
 (0)