- it { is_expected.to contain_package('software-properties-common') }
- it {
- is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Class[Apt::Update]').with('environment' => [],
- 'command' => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow', # rubocop:disable Metrics/LineLength
- 'unless' => '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list', # rubocop:disable Metrics/LineLength
- 'user' => 'root',
- 'logoutput' => 'on_failure')
- }
-
- it {
- is_expected.to contain_file('/etc/apt/sources.list.d/needs-such_substitution-wow-natty.list').that_requires('Exec[add-apt-repository-ppa:needs/such.substitution/wow]').with('ensure' => 'file')
- }
- end
-
- describe 'package_manage => true, multiple ppas, MODULES-2873' do
- let :pre_condition do
- 'class { "apt": }
- apt::ppa {"ppa:user/foo":
- package_manage => true
- }'
- end