Is there a way to check which package installed on server by command output?
describe command('mysql -e "select version();"') do
if its(:stdout) { should =~ /5.6.27-76.0-log/ }
describe package('MySQL-client') do
it { should be_installed }
else
describe package('Percona-client') do
it { should be_installed }
end
end
Thanks,