|
24 | 24 | end |
25 | 25 |
|
26 | 26 | it 'should contain resource from environments/foo site.pp' do |
27 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
28 | | - @result.diffs, |
29 | | - ['+', "File\f/tmp/environment-foo-site"] |
30 | | - )).to eq(true) |
| 27 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-site' } |
| 28 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
31 | 29 | end |
32 | 30 |
|
33 | 31 | it 'should contain resource from environments/foo modules/foo' do |
34 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
35 | | - @result.diffs, |
36 | | - ['+', "File\f/tmp/environment-foo-module"] |
37 | | - )).to eq(true) |
| 32 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-module' } |
| 33 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
38 | 34 | end |
39 | 35 |
|
40 | 36 | it 'should not contain resource from environments/production' do |
41 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
42 | | - @result.diffs, |
43 | | - ['+', "File\f/tmp/environment-production-site"] |
44 | | - )).to eq(false) |
| 37 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-production-site' } |
| 38 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
45 | 39 | end |
46 | 40 |
|
47 | 41 | it 'should not contain resource from main modules/foo' do |
48 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
49 | | - @result.diffs, |
50 | | - ['+', "File\f/tmp/foo-module"] |
51 | | - )).to eq(false) |
| 42 | + resource = { diff_type: '+', type: 'File', title: '/tmp/foo-module' } |
| 43 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
52 | 44 | end |
53 | 45 | end |
54 | 46 |
|
|
71 | 63 | end |
72 | 64 |
|
73 | 65 | it 'should contain resource from environments/foo site.pp only in to catalog' do |
74 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
75 | | - @result.diffs, |
76 | | - ['+', "File\f/tmp/environment-foo-site"] |
77 | | - )).to eq(true) |
| 66 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-site' } |
| 67 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
78 | 68 | end |
79 | 69 |
|
80 | 70 | it 'should contain resource from environments/foo modules/foo only in to catalog' do |
81 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
82 | | - @result.diffs, |
83 | | - ['+', "File\f/tmp/environment-foo-module"] |
84 | | - )).to eq(true) |
| 71 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-module' } |
| 72 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
85 | 73 | end |
86 | 74 |
|
87 | 75 | it 'should contain resource from environments/production only in from catalog' do |
88 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
89 | | - @result.diffs, |
90 | | - ['-', "File\f/tmp/environment-production-site"] |
91 | | - )).to eq(true) |
| 76 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-production-site' } |
| 77 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
92 | 78 | end |
93 | 79 | end |
94 | 80 |
|
|
112 | 98 | end |
113 | 99 |
|
114 | 100 | it 'should contain resource from environments/foo site.pp' do |
115 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
116 | | - @result.diffs, |
117 | | - ['+', "File\f/tmp/environment-foo-site"] |
118 | | - )).to eq(true) |
| 101 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-site' } |
| 102 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
119 | 103 | end |
120 | 104 |
|
121 | 105 | it 'should contain resource from environments/foo modules/foo' do |
122 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
123 | | - @result.diffs, |
124 | | - ['+', "File\f/tmp/environment-foo-module"] |
125 | | - )).to eq(true) |
| 106 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-module' } |
| 107 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
126 | 108 | end |
127 | 109 |
|
128 | 110 | it 'should not contain resource from environments/production' do |
129 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
130 | | - @result.diffs, |
131 | | - ['+', "File\f/tmp/environment-production-site"] |
132 | | - )).to eq(false) |
| 111 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-production-site' } |
| 112 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
133 | 113 | end |
134 | 114 |
|
135 | 115 | it 'should not contain resource from main modules/foo' do |
136 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
137 | | - @result.diffs, |
138 | | - ['+', "File\f/tmp/foo-module"] |
139 | | - )).to eq(false) |
| 116 | + resource = { diff_type: '+', type: 'File', title: '/tmp/foo-module' } |
| 117 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
140 | 118 | end |
141 | 119 | end |
142 | 120 |
|
|
160 | 138 | end |
161 | 139 |
|
162 | 140 | it 'should contain resource from environments/foo site.pp' do |
163 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
164 | | - @result.diffs, |
165 | | - ['+', "File\f/tmp/environment-foo-site"] |
166 | | - )).to eq(true) |
| 141 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-site' } |
| 142 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
167 | 143 | end |
168 | 144 |
|
169 | 145 | it 'should not contain resource from environments/foo modules/foo' do |
170 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
171 | | - @result.diffs, |
172 | | - ['+', "File\f/tmp/environment-foo-module"] |
173 | | - )).to eq(false) |
| 146 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-foo-module' } |
| 147 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
174 | 148 | end |
175 | 149 |
|
176 | 150 | it 'should not contain resource from environments/production' do |
177 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
178 | | - @result.diffs, |
179 | | - ['+', "File\f/tmp/environment-production-site"] |
180 | | - )).to eq(false) |
| 151 | + resource = { diff_type: '+', type: 'File', title: '/tmp/environment-production-site' } |
| 152 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(false) |
181 | 153 | end |
182 | 154 |
|
183 | 155 | it 'should contain resource from main modules/foo' do |
184 | | - expect(OctocatalogDiff::Spec.array_contains_partial_array?( |
185 | | - @result.diffs, |
186 | | - ['+', "File\f/tmp/foo-module"] |
187 | | - )).to eq(true) |
| 156 | + resource = { diff_type: '+', type: 'File', title: '/tmp/foo-module' } |
| 157 | + expect(OctocatalogDiff::Spec.diff_match?(@result[:diffs], resource)).to eq(true) |
188 | 158 | end |
189 | 159 | end |
190 | 160 | end |
0 commit comments