end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{source entry without specifying a location})
+ is_expected.to raise_error(Puppet::Error, %r{source entry without specifying a location})
end
end
context 'with location' do
end
it {
- is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(%r{deb-src}) # rubocop:disable Metrics/LineLength
+ is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# foo\ndeb \[arch=x86_64 trusted=yes\] http://debian.mirror.iweb.ca/debian/ sid testing\n})
+ .without_content(%r{deb-src})
}
it {
end
it {
- is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(%r{deb-src}) # rubocop:disable Metrics/LineLength
+ is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# foo\ndeb \[arch=x86_64 trusted=yes\] http://debian.mirror.iweb.ca/debian/ sid testing\n})
+ .without_content(%r{deb-src})
}
it {
end
it {
- is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(%r{deb-src}) # rubocop:disable Metrics/LineLength
+ is_expected.to contain_apt__setting('list-my_source').with(ensure: 'present').with_content(%r{# foo\ndeb \[arch=x86_64 trusted=yes\] http://debian.mirror.iweb.ca/debian/ sid testing\n})
+ .without_content(%r{deb-src})
}
it {
let(:params) { { location: 'hello.there' } }
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{lsbdistcodename fact not available: release parameter required})
+ is_expected.to raise_error(Puppet::Error, %r{lsbdistcodename fact not available: release parameter required})
end
end
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a value})
+ is_expected.to raise_error(Puppet::Error, %r{expects a value})
end
end