test(pkgs_spec): simplify using match (trigger: update for suse)

* https://travis-ci.org/github/myii/salt-formula/jobs/692337807#L2366-L2381
  - `opensuse` now has `3000.3` available
* Simplification is useful anyway, even without this (could still use `case`)
This commit is contained in:
Imran Iqbal committed 2020-06-01 01:52:08 +01:00
1 parent 335af0267e
commit b2b1fee370
4 files changed
+12 -76

No files matched your search

@@ -1,21 +1,17 @@
# frozen_string_literal: true
version =
case platform[:family]
when 'debian'
'3000.3+ds-1'
end
control 'salt packages' do
title 'should be installed'
version = '3000.3'
%w[
salt-master
salt-minion
].each do |p|
describe package(p) do
it { should be_installed }
its('version') { should eq version }
its('version') { should match(/^#{version}/) }
end
end
end