File tree Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Expand file tree Collapse file tree 1 file changed +12
-10
lines changed Original file line number Diff line number Diff line change 11require 'spec_helper'
22
33describe 'foreman_proxy::plugin' do
4- on_supported_os . each do |os , facts |
4+ on_supported_os . each do |os , os_facts |
55 context "on #{ os } " do
6- let ( :facts ) { facts }
6+ let ( :facts ) { os_facts }
77 let ( :title ) { 'myplugin' }
88 let ( :pre_condition ) { 'include foreman_proxy::params' }
99
1010 context 'no parameters' do
11- package = if facts [ :osfamily ] == 'Debian'
12- 'ruby-smart-proxy-myplugin'
13- elsif facts [ :osfamily ] == 'RedHat' && facts [ :operatingsystemmajrelease ] == '7'
14- 'tfm-rubygem-smart_proxy_myplugin'
15- else
16- 'rubygem-smart_proxy_myplugin'
17- end
11+ let ( :package ) do
12+ if facts [ :osfamily ] == 'Debian'
13+ 'ruby-smart-proxy-myplugin'
14+ elsif facts [ :osfamily ] == 'RedHat' && facts [ :operatingsystemmajrelease ] == '7'
15+ 'tfm-rubygem-smart_proxy_myplugin'
16+ else
17+ 'rubygem-smart_proxy_myplugin'
18+ end
19+ end
1820
1921 it 'should install the correct package' do
2022 should contain_package ( package ) . with_ensure ( 'installed' )
4749 :package => 'my_fun_plugin' ,
4850 } end
4951
50- case facts [ :osfamily ]
52+ case os_facts [ :osfamily ]
5153 when 'Debian'
5254 it 'should use hyphens' do
5355 should contain_package ( 'my-fun-plugin' ) . with_ensure ( 'installed' )
You can’t perform that action at this time.
0 commit comments