- let(:title) { 'ppa:needs/such.substitution/wow' }
- it { is_expected.to_not contain_package('python-software-properties') }
- it { is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow').that_notifies('Exec[apt_update]').with({
- :environment => [],
- :command => '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow',
- :unless => '/usr/bin/test -s /etc/apt/sources.list.d/needs-such_substitution-wow-natty.list',
- :user => 'root',
- :logoutput => 'on_failure',
- })
+ let(:title) { 'ppa:needs/such.substitution/wow+type' }
+
+ it { is_expected.not_to contain_package('python-software-properties') }
+ it {
+ is_expected.to contain_exec('add-apt-repository-ppa:needs/such.substitution/wow+type').that_notifies('Class[Apt::Update]').with(environment: [],
+ command: '/usr/bin/add-apt-repository -y ppa:needs/such.substitution/wow+type || (rm /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow_type-trusty.list && false)', # rubocop:disable Layout/LineLength
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-ubuntu-such_substitution-wow_type-trusty.list && /usr/bin/test -f /etc/apt/trusted.gpg.d/needs_ubuntu_such_substitution-wow_type.gpg', # rubocop:disable Layout/LineLength
+ user: 'root',
+ logoutput: 'on_failure')