File tree Expand file tree Collapse file tree 2 files changed +55
-1
lines changed
Expand file tree Collapse file tree 2 files changed +55
-1
lines changed Original file line number Diff line number Diff line change 1+ {
2+ "warnings" : [
3+ " some warning" ,
4+ " another warning"
5+ ],
6+ "ld_warnings" : [
7+
8+ ],
9+ "compile_warnings" : [
10+
11+ ],
12+ "errors" : [
13+ " some error" ,
14+ " another error"
15+ ],
16+ "compile_errors" : [
17+
18+ ],
19+ "file_missing_errors" : [
20+
21+ ],
22+ "undefined_symbols_errors" : [
23+
24+ ],
25+ "duplicate_symbols_errors" : [
26+
27+ ],
28+ "tests_failures" : {
29+ },
30+ "tests_summary_messages" : [
31+ ]
32+ }
Original file line number Diff line number Diff line change @@ -156,7 +156,7 @@ module Danger
156156 expect ( @dangerfile . status_report [ :warnings ] ) . to eq [ 'another warning' ]
157157 end
158158
159- it 'report waring and error counts with no errors' do
159+ it 'report warning and error counts with no errors' do
160160 result = @xcode_summary . warning_error_count ( 'spec/fixtures/errors.json' )
161161 expect ( result ) . to eq '{"warnings":0,"errors":1}'
162162 end
@@ -166,6 +166,28 @@ module Danger
166166 expect ( result ) . to eq '{"warnings":1,"errors":0}'
167167 end
168168 end
169+
170+ context 'with ignores_warnings' do
171+ before do
172+ @xcode_summary . ignores_warnings = true
173+ end
174+
175+ it 'asserts no ld warnings' do
176+ @xcode_summary . report ( 'spec/fixtures/ld_warnings.json' )
177+ expect ( @dangerfile . status_report [ :warnings ] ) . to eq [ ]
178+ end
179+
180+ it 'asserts no errors' do
181+ @xcode_summary . report ( 'spec/fixtures/warnings_errors.json' )
182+ expect ( @dangerfile . status_report [ :warnings ] ) . to eq [ ]
183+ expect ( @dangerfile . status_report [ :errors ] ) . to eq [ 'some error' , 'another error' ]
184+ end
185+
186+ it 'report warning and error counts with no warning' do
187+ result = @xcode_summary . warning_error_count ( 'spec/fixtures/warnings_errors.json' )
188+ expect ( result ) . to eq '{"warnings":0,"errors":2}'
189+ end
190+ end
169191 end
170192 end
171193
You can’t perform that action at this time.
0 commit comments