+ let :facts do
+ {
+ os: { family: 'Debian', name: 'Ubuntu', release: { major: '11', full: '11.04' } },
+ lsbdistrelease: '11.04',
+ lsbdistcodename: 'natty',
+ operatingsystem: 'Ubuntu',
+ osfamily: 'Debian',
+ lsbdistid: 'Ubuntu',
+ puppetversion: Puppet.version,
+ }
+ end
+
+ 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', # rubocop:disable Metrics/LineLength
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/needs-such_substitution-wow_type-natty.list', # rubocop:disable Metrics/LineLength
+ user: 'root',
+ logoutput: 'on_failure')
+ }
+ end
+
+ describe 'Ubuntu 15.10 sources.list filename' do
+ let :facts do
+ {
+ os: { family: 'Debian', name: 'Ubuntu', release: { major: '15', full: '15.10' } },
+ lsbdistrelease: '15.10',
+ lsbdistcodename: 'wily',
+ operatingsystem: 'Ubuntu',
+ osfamily: 'Debian',
+ lsbdistid: 'Ubuntu',
+ puppetversion: Puppet.version,
+ }
+ end
+
+ let(:title) { 'ppa:user/foo' }
+
+ it {
+ is_expected.to contain_exec('add-apt-repository-ppa:user/foo').that_notifies('Class[Apt::Update]').with(environment: [],
+ command: '/usr/bin/add-apt-repository -y ppa:user/foo',
+ unless: '/usr/bin/test -f /etc/apt/sources.list.d/user-ubuntu-foo-wily.list',
+ user: 'root',
+ logoutput: 'on_failure')
+ }
+ end
+
+ describe 'package_name => software-properties-common' do