|
10 | 10 | # rubocop:disable RSpec/RepeatedExample
|
11 | 11 | context 'with defaults' do
|
12 | 12 | if facts[:os]['name'] == 'Darwin'
|
13 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
| 13 | + it { is_expected.to compile.with_all_deps } |
| 14 | + it { is_expected.to contain_package('git').with_provider('brew') } |
| 15 | + it { is_expected.not_to contain_package('bash-completion') } |
14 | 16 | elsif facts[:os]['name'] == 'windows'
|
15 | 17 | it { is_expected.to compile.with_all_deps }
|
16 |
| - it { is_expected.to contain_package('git') } |
17 |
| - else |
| 18 | + it { is_expected.to contain_package('git').with_provider('chocolatey') } |
| 19 | + it { is_expected.not_to contain_package('bash-completion') } |
| 20 | + elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
18 | 21 | it { is_expected.to compile.with_all_deps }
|
19 | 22 | it { is_expected.to contain_package('git') }
|
20 | 23 | it { is_expected.not_to contain_package('gitk') }
|
|
36 | 39 | end
|
37 | 40 |
|
38 | 41 | if facts[:os]['name'] == 'Darwin'
|
39 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
| 42 | + it { is_expected.to compile.with_all_deps } |
| 43 | + it { is_expected.to contain_package('git').with_provider('brew') } |
| 44 | + it { is_expected.not_to contain_package('gitk') } |
| 45 | + it { is_expected.not_to contain_package('git-gui') } |
40 | 46 | elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name'])
|
41 | 47 | it { is_expected.to compile.with_all_deps }
|
42 | 48 | it { is_expected.to contain_package('git') }
|
|
54 | 60 | end
|
55 | 61 |
|
56 | 62 | if facts[:os]['name'] == 'Darwin'
|
57 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
| 63 | + it { is_expected.to compile.with_all_deps } |
| 64 | + it { is_expected.to contain_package('git').with_provider('brew') } |
| 65 | + it { is_expected.to contain_package('bash-completion').with_provider('brew') } |
| 66 | + elsif facts[:os]['name'] == 'windows' |
| 67 | + it { is_expected.to compile.with_all_deps } |
| 68 | + it { is_expected.to contain_package('git').with_provider('chocolatey') } |
| 69 | + it { is_expected.not_to contain_package('bash-completion') } |
58 | 70 | elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name'])
|
59 | 71 | it { is_expected.to compile.with_all_deps }
|
60 | 72 | it { is_expected.to contain_package('git') }
|
|
75 | 87 | }
|
76 | 88 | end
|
77 | 89 |
|
78 |
| - if facts[:os]['name'] == 'Darwin' |
79 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
80 |
| - elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
| 90 | + if ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
81 | 91 | it { is_expected.to compile.with_all_deps }
|
82 | 92 | it { is_expected.to contain_package('git') }
|
83 | 93 | it {
|
|
103 | 113 | }
|
104 | 114 | end
|
105 | 115 |
|
106 |
| - if facts[:os]['name'] == 'Darwin' |
107 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
108 |
| - elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
| 116 | + if ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
109 | 117 | it { is_expected.to compile.with_all_deps }
|
110 | 118 | it { is_expected.to contain_package('git') }
|
111 | 119 | it { is_expected.not_to contain_file('/etc/gitconfig') }
|
|
133 | 141 | }
|
134 | 142 | end
|
135 | 143 |
|
136 |
| - if facts[:os]['name'] == 'Darwin' |
137 |
| - it { is_expected.to compile.and_raise_error(%r{is not supported on Darwin.}) } |
138 |
| - elsif ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
| 144 | + if ['Debian', 'Ubuntu'].include?(facts[:os]['name']) |
139 | 145 | it { is_expected.to compile.with_all_deps }
|
140 | 146 | it { is_expected.to contain_package('git') }
|
141 | 147 | it {
|
|
0 commit comments