X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fclasses%2Fapt_backports_spec.rb;h=33022b96cd35c2ee63539400d4043b1f9ea10456;hb=4d21aebedd1160fbfbdce2b33f62109d87dd2aea;hp=b8e14245a79419fc04c4464ca87bd785eb95b85a;hpb=4ea96b8d7ec3dd0d6acabb1d7718f96b8def614c;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/classes/apt_backports_spec.rb b/spec/classes/apt_backports_spec.rb index b8e1424..33022b9 100644 --- a/spec/classes/apt_backports_spec.rb +++ b/spec/classes/apt_backports_spec.rb @@ -4,7 +4,7 @@ describe 'apt::backports', type: :class do let(:pre_condition) { "class{ '::apt': }" } describe 'debian/ubuntu tests' do - context 'defaults on deb' do + context 'with defaults on deb' do let(:facts) do { os: { family: 'Debian', name: 'Debian', release: { major: '7', full: '7.0' } }, @@ -23,7 +23,7 @@ describe 'apt::backports', type: :class do pin: { 'priority' => 200, 'release' => 'wheezy-backports' }) } end - context 'defaults on ubuntu' do + context 'with defaults on ubuntu' do let(:facts) do { os: { family: 'Debian', name: 'Ubuntu', release: { major: '14', full: '14.04' } }, @@ -43,7 +43,7 @@ describe 'apt::backports', type: :class do pin: { 'priority' => 200, 'release' => 'trusty-backports' }) } end - context 'set everything' do + context 'with everything set' do let(:facts) do { os: { family: 'Debian', name: 'Ubuntu', release: { major: '14', full: '14.04' } }, @@ -72,7 +72,7 @@ describe 'apt::backports', type: :class do pin: { 'priority' => 90, 'release' => 'vivid' }) } end - context 'set things with hashes' do + context 'when set things with hashes' do let(:facts) do { os: { family: 'Debian', name: 'Ubuntu', release: { major: '14', full: '14.04' } }, @@ -111,7 +111,7 @@ describe 'apt::backports', type: :class do } end - context 'sets all the needed things' do + context 'with all the needed things set' do let(:params) do { location: 'http://archive.ubuntu.com/ubuntu', @@ -129,7 +129,7 @@ describe 'apt::backports', type: :class do pin: { 'priority' => 200, 'release' => 'trusty-backports' }) } end - context 'missing location' do + context 'with missing location' do let(:params) do { release: 'trusty-backports', @@ -142,7 +142,7 @@ describe 'apt::backports', type: :class do 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 + context 'with missing release' do let(:params) do { location: 'http://archive.ubuntu.com/ubuntu', @@ -155,7 +155,7 @@ describe 'apt::backports', type: :class do 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 + context 'with missing repos' do let(:params) do { location: 'http://archive.ubuntu.com/ubuntu', @@ -168,7 +168,7 @@ describe 'apt::backports', type: :class do 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 + context 'with missing key' do let(:params) do { location: 'http://archive.ubuntu.com/ubuntu', @@ -194,7 +194,7 @@ describe 'apt::backports', type: :class do } end - context 'invalid location' do + context 'with invalid location' do let(:params) do { location: true, @@ -205,7 +205,7 @@ describe 'apt::backports', type: :class do is_expected.to raise_error(Puppet::Error, %r{expects a}) end end - context 'invalid release' do + context 'with invalid release' do let(:params) do { release: true, @@ -216,7 +216,7 @@ describe 'apt::backports', type: :class do is_expected.to raise_error(Puppet::Error, %r{expects a}) end end - context 'invalid repos' do + context 'with invalid repos' do let(:params) do { repos: true, @@ -227,7 +227,7 @@ describe 'apt::backports', type: :class do is_expected.to raise_error(Puppet::Error, %r{expects a}) end end - context 'invalid key' do + context 'with invalid key' do let(:params) do { key: true, @@ -238,7 +238,7 @@ describe 'apt::backports', type: :class do is_expected.to raise_error(Puppet::Error, %r{expects a}) end end - context 'invalid pin' do + context 'with invalid pin' do let(:params) do { pin: true,