Code Review
/
puppet-modules
/
puppetlabs-apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Module sync 1d81b6a
[puppet-modules/puppetlabs-apt.git]
/
spec
/
defines
/
source_spec.rb
diff --git
a/spec/defines/source_spec.rb
b/spec/defines/source_spec.rb
index 52a7ca9e9cf64b398df1b443e7c54e05fa33ec22..9cec5802d0f9d80b8556184559959d6c3a89a87f 100644
(file)
--- a/
spec/defines/source_spec.rb
+++ b/
spec/defines/source_spec.rb
@@
-23,9
+23,7
@@
describe 'apt::source' do
end
it do
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
end
context 'with location' do
@@
-98,7
+96,8
@@
describe 'apt::source' do
end
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 {
}
it {
@@
-130,7
+129,8
@@
describe 'apt::source' do
end
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 {
}
it {
@@
-163,7
+163,8
@@
describe 'apt::source' do
end
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 {
}
it {
@@
-349,9
+350,7
@@
describe 'apt::source' do
let(:params) { { location: 'hello.there' } }
it do
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
end
@@
-387,9
+386,7
@@
describe 'apt::source' do
end
it do
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
end
end