|
12 | 12 | let(:path) { './hieradata/nodes/foo.example.com.yaml' } |
13 | 13 |
|
14 | 14 | it 'detects one problem' do |
15 | | - expect(problems).to have(1).problems |
| 15 | + expect(problems.size).to eq(1) |
16 | 16 | end |
17 | 17 |
|
18 | 18 | it 'creates a warning' do |
|
24 | 24 | let(:path) { './hieradata/nodes/bar.example.com.yaml' } |
25 | 25 |
|
26 | 26 | it 'does not detect any problem' do |
27 | | - expect(problems).to have(0).problems |
| 27 | + expect(problems.size).to eq(0) |
28 | 28 | end |
29 | 29 | end |
30 | 30 |
|
31 | 31 | context 'when an environment file is NOT used' do |
32 | 32 | let(:path) { './hieradata/environment/foo.yaml' } |
33 | 33 |
|
34 | 34 | it 'detects one problem' do |
35 | | - expect(problems).to have(1).problems |
| 35 | + expect(problems.size).to eq(1) |
36 | 36 | end |
37 | 37 |
|
38 | 38 | it 'creates a warning' do |
|
44 | 44 | let(:path) { './hieradata/environment/production.yaml' } |
45 | 45 |
|
46 | 46 | it 'does not detect any problem' do |
47 | | - expect(problems).to have(0).problems |
| 47 | + expect(problems.size).to eq(0) |
48 | 48 | end |
49 | 49 | end |
50 | 50 |
|
51 | 51 | context 'when an fact is NOT used' do |
52 | 52 | let(:path) { './hieradata/virtual/false.yaml' } |
53 | 53 |
|
54 | 54 | it 'detects one problem' do |
55 | | - expect(problems).to have(1).problems |
| 55 | + expect(problems.size).to eq(1) |
56 | 56 | end |
57 | 57 |
|
58 | 58 | it 'creates a warning' do |
|
64 | 64 | let(:path) { './hieradata/virtual/true.yaml' } |
65 | 65 |
|
66 | 66 | it 'does not detect any problem' do |
67 | | - expect(problems).to have(0).problems |
| 67 | + expect(problems.size).to eq(0) |
68 | 68 | end |
69 | 69 | end |
70 | 70 |
|
71 | 71 | context 'when using a variable in hierarchy' do |
72 | 72 | let(:path) { './hieradata/domain/example.com.yaml' } |
73 | 73 |
|
74 | 74 | it 'does not detect any problem' do |
75 | | - expect(problems).to have(0).problems |
| 75 | + expect(problems.size).to eq(0) |
76 | 76 | end |
77 | 77 | end |
78 | 78 | end |
|
0 commit comments