require 'spec_helper'
describe 'apt::backports', type: :class do
- let (:pre_condition) { "class{ '::apt': }" }
+ let(:pre_condition) { "class{ '::apt': }" }
describe 'debian/ubuntu tests' do
context 'defaults on deb' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
+ is_expected.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
end
end
context 'missing release' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
+ is_expected.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
end
end
context 'missing repos' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
+ is_expected.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
end
end
context 'missing key' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
+ is_expected.to raise_error(Puppet::Error, %r{If not on Debian or Ubuntu, you must explicitly pass location, release, repos, and key})
end
end
end
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a})
+ is_expected.to raise_error(Puppet::Error, %r{expects a})
end
end
context 'invalid release' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a})
+ is_expected.to raise_error(Puppet::Error, %r{expects a})
end
end
context 'invalid repos' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a})
+ is_expected.to raise_error(Puppet::Error, %r{expects a})
end
end
context 'invalid key' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a})
+ is_expected.to raise_error(Puppet::Error, %r{expects a})
end
end
context 'invalid pin' do
end
it do
- expect {
- subject.call
- }.to raise_error(Puppet::Error, %r{expects a})
+ is_expected.to raise_error(Puppet::Error, %r{expects a})
end
end
end