|
32 | 32 | expect(diffs.first.change?).to eq(true)
|
33 | 33 | expect(diffs.first.structure).to eq(['tags'])
|
34 | 34 | expect(diffs.first.old_value).to eq(['tag-one', 'tag-two'])
|
35 |
| - expect(diffs.first.new_value).to eq(['tag-one-new', 'tag-too']) |
| 35 | + expect(diffs.first.new_value).to eq(['ignore-tag__file', 'tag-one-new', 'tag-too']) |
36 | 36 | end
|
37 | 37 | end
|
38 | 38 |
|
39 | 39 | context 'with --no-include-tags specified' do
|
| 40 | + let(:argv) do |
| 41 | + default_argv.concat ['--no-include-tags'] |
| 42 | + end |
| 43 | + |
| 44 | + let(:result) do |
| 45 | + OctocatalogDiff::Integration.integration( |
| 46 | + argv: argv |
| 47 | + ) |
| 48 | + end |
| 49 | + |
| 50 | + it 'should exit indicating success with no differences' do |
| 51 | + expect(result.exitcode).to eq(0) |
| 52 | + end |
| 53 | + |
| 54 | + it 'should contain representative tag differences' do |
| 55 | + diffs = result.diffs |
| 56 | + expect(diffs.size).to eq(0) |
| 57 | + end |
40 | 58 | end
|
41 | 59 |
|
42 | 60 | context 'with --include-tags not specified' do
|
| 61 | + let(:argv) do |
| 62 | + default_argv |
| 63 | + end |
| 64 | + |
| 65 | + let(:result) do |
| 66 | + OctocatalogDiff::Integration.integration( |
| 67 | + argv: argv |
| 68 | + ) |
| 69 | + end |
| 70 | + |
| 71 | + it 'should exit indicating success with no differences' do |
| 72 | + expect(result.exitcode).to eq(0) |
| 73 | + end |
| 74 | + |
| 75 | + it 'should contain representative tag differences' do |
| 76 | + diffs = result.diffs |
| 77 | + expect(diffs.size).to eq(0) |
| 78 | + end |
43 | 79 | end
|
44 | 80 |
|
45 | 81 | context 'with --ignore-tags and --include-tags specified' do
|
| 82 | + let(:argv) do |
| 83 | + default_argv.concat ['--include-tags', '--ignore-tags', 'foo'] |
| 84 | + end |
| 85 | + |
| 86 | + let(:result) do |
| 87 | + OctocatalogDiff::Integration.integration( |
| 88 | + argv: argv |
| 89 | + ) |
| 90 | + end |
| 91 | + |
| 92 | + it 'should exit indicating success with differences' do |
| 93 | + expect(result.exitcode).to eq(2) |
| 94 | + end |
| 95 | + |
| 96 | + it 'should contain representative tag differences' do |
| 97 | + diffs = result.diffs |
| 98 | + expect(diffs.size).to eq(1) |
| 99 | + expect(diffs.first.change?).to eq(true) |
| 100 | + expect(diffs.first.structure).to eq(['tags']) |
| 101 | + expect(diffs.first.old_value).to eq(['tag-one', 'tag-two']) |
| 102 | + expect(diffs.first.new_value).to eq(['ignore-tag__file', 'tag-one-new', 'tag-too']) |
| 103 | + end |
46 | 104 | end
|
47 | 105 |
|
48 | 106 | context 'with --ignore-tags and --no-include-tags specified' do
|
| 107 | + let(:argv) do |
| 108 | + default_argv.concat ['--no-include-tags', '--ignore-tags', 'foo'] |
| 109 | + end |
| 110 | + |
| 111 | + let(:result) do |
| 112 | + OctocatalogDiff::Integration.integration( |
| 113 | + argv: argv |
| 114 | + ) |
| 115 | + end |
| 116 | + |
| 117 | + it 'should exit indicating success with no differences' do |
| 118 | + expect(result.exitcode).to eq(0) |
| 119 | + end |
| 120 | + |
| 121 | + it 'should contain representative tag differences' do |
| 122 | + diffs = result.diffs |
| 123 | + expect(diffs.size).to eq(0) |
| 124 | + end |
| 125 | + end |
| 126 | + |
| 127 | + context 'with matching --ignore-tags and --include-tags specified' do |
| 128 | + let(:argv) do |
| 129 | + default_argv.concat ['--include-tags', '--ignore-tags', 'ignore-tag'] |
| 130 | + end |
| 131 | + |
| 132 | + let(:result) do |
| 133 | + OctocatalogDiff::Integration.integration( |
| 134 | + argv: argv |
| 135 | + ) |
| 136 | + end |
| 137 | + |
| 138 | + it 'should exit indicating success with no differences' do |
| 139 | + expect(result.exitcode).to eq(0) |
| 140 | + end |
| 141 | + |
| 142 | + it 'should contain representative tag differences' do |
| 143 | + diffs = result.diffs |
| 144 | + expect(diffs.size).to eq(0) |
| 145 | + end |
49 | 146 | end
|
50 | 147 | end
|
0 commit comments