X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=spec%2Fdefines%2Fsource_spec.rb;h=ad986e96843b28ac50efe2138d634092908fa608;hb=351c8d5941f6bd02304df6b4185dea8c8104aefa;hp=85a6d76043f4ea7389d7008b481a886027150782;hpb=10f313cfb4138b34481e219e231251c15acc84da;p=puppet-modules%2Fpuppetlabs-apt.git diff --git a/spec/defines/source_spec.rb b/spec/defines/source_spec.rb index 85a6d76..ad986e9 100644 --- a/spec/defines/source_spec.rb +++ b/spec/defines/source_spec.rb @@ -27,7 +27,7 @@ describe 'apt::source', :type => :define do } end - it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({ + it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({ 'ensure' => 'present', }).with_content(/# my_source\ndeb-src wheezy main\n/) } @@ -58,19 +58,19 @@ describe 'apt::source', :type => :define do } end - it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({ + it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({ 'ensure' => 'present', }).with_content(/# foo\ndeb \[arch=x86_64 trusted=yes\] http:\/\/debian\.mirror\.iweb\.ca\/debian\/ sid testing\n/).without_content(/deb-src/) } - it { is_expected.to contain_apt__pin('my_source').that_comes_before('Apt::Setting[my_source]').with({ + it { is_expected.to contain_apt__pin('my_source').that_comes_before('Apt::Setting[list-my_source]').with({ 'ensure' => 'present', 'priority' => '10', 'origin' => 'debian.mirror.iweb.ca', }) } - it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[my_source]').with({ + it { is_expected.to contain_apt__key("Add key: #{GPG_KEY_ID} from Apt::Source my_source").that_comes_before('Apt::Setting[list-my_source]').with({ 'ensure' => 'present', 'key' => GPG_KEY_ID, 'key_server' => 'pgp.mit.edu', @@ -95,7 +95,7 @@ describe 'apt::source', :type => :define do } end - it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({ + it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({ 'ensure' => 'present', }).with_content(/# my_source\ndeb \[trusted=yes\] wheezy main\n/) } @@ -117,7 +117,7 @@ describe 'apt::source', :type => :define do } end - it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({ + it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({ 'ensure' => 'present', }).with_content(/# my_source\ndeb-src \[arch=x86_64 \] wheezy main\n/) } @@ -137,7 +137,7 @@ describe 'apt::source', :type => :define do } end - it { is_expected.to contain_apt__setting('my_source').that_notifies('Exec[apt_update]').with({ + it { is_expected.to contain_apt__setting('list-my_source').that_notifies('Exec[apt_update]').with({ 'ensure' => 'absent' }) } @@ -154,7 +154,7 @@ describe 'apt::source', :type => :define do it do expect { - should compile + is_expected.to compile }.to raise_error(Puppet::Error, /lsbdistcodename fact not available: release parameter required/) end end