Skip to content

Commit

Permalink
add spec tests
Browse files Browse the repository at this point in the history
  • Loading branch information
trefzer committed Mar 11, 2024
1 parent 60d990c commit 1dd7a6c
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions spec/defines/instance_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,22 @@ class { 'redis':

it { is_expected.to contain_service('redis-server-app2.service').with_ensure(true).with_enable(true) }
end

context 'with custom options' do
let(:title) { 'default' }
let :params do {

Check failure on line 55 in spec/defines/instance_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/MultilineBlockLayout: Block body expression is on the same line as the block start.
config_file_orig: '/tmp/myorig.conf',
custom_options: { 'myoption' => 'avalue', 'anotheroption' => 'anothervalue' },
}
end

it {
is_expected.to contain_file('/tmp/myorig.conf')
.with_content(%r{^bind 127.0.0.1})

Check failure on line 63 in spec/defines/instance_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/DotPosition: Place the . on the previous line, together with the method call receiver. (https://rubystyle.guide#consistent-multi-line-chains)
.with_content(%r{^myoption avalue})

Check failure on line 64 in spec/defines/instance_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/DotPosition: Place the . on the previous line, together with the method call receiver. (https://rubystyle.guide#consistent-multi-line-chains)
.with_content(%r{^anotheroption anothervalue})

Check failure on line 65 in spec/defines/instance_spec.rb

View workflow job for this annotation

GitHub Actions / Puppet / Static validations

Layout/DotPosition: Place the . on the previous line, together with the method call receiver. (https://rubystyle.guide#consistent-multi-line-chains)
}
end
end
end
end

0 comments on commit 1dd7a6c

Please sign in to comment.