spec/xcpretty/parser_spec.rb in xcpretty-0.1.4 vs spec/xcpretty/parser_spec.rb in xcpretty-0.1.5
- old
+ new
@@ -56,10 +56,16 @@
it "parses code signing a framework" do
@formatter.should receive(:format_codesign).with("build/Release/CocoaChipCore.framework")
@parser.parse(SAMPLE_CODESIGN_FRAMEWORK)
end
+ it "parses compiler commands" do
+ compile_statement = SAMPLE_ANOTHER_COMPILE.lines().to_a.last()
+ @formatter.should receive(:format_compile_command).with(compile_statement.strip())
+ @parser.parse(compile_statement)
+ end
+
it "parses compiling categories" do
@formatter.should receive(:format_compile).with("NSMutableArray+ObjectiveSugar.m", "/Users/musalj/code/OSS/ObjectiveSugar/Classes/NSMutableArray+ObjectiveSugar.m")
@parser.parse(SAMPLE_COMPILE)
end
@@ -182,17 +188,31 @@
@formatter.should receive(:format_tiffutil).with('eye_icon.tiff')
@parser.parse(SAMPLE_TIFFUTIL)
end
it "parses undefined symbols" do
- @formatter.should receive(:format_linker_failure).with("Undefined symbols for architecture x86_64",
- '_OBJC_CLASS_$_CABasicAnimation',
- 'objc-class-ref in ATZRadialProgressControl.o')
-
+ @formatter.should receive(:format_undefined_symbols).with("Undefined symbols for architecture x86_64",
+ '_OBJC_CLASS_$_CABasicAnimation',
+ 'objc-class-ref in ATZRadialProgressControl.o')
SAMPLE_UNDEFINED_SYMBOLS.each_line do |line|
@parser.parse(line)
end
end
+
+ it "parses duplicate symbols" do
+ @formatter.should receive(:format_duplicate_symbols).with(
+ "duplicate symbol _OBJC_IVAR_$ClassName._ivarName in",
+ [
+ '/Users/username/Library/Developer/Xcode/DerivedData/App-arcyyktezaigixbocjwfhsjllojz/Build/Intermediates/App.build/Debug-iphonesimulator/App.build/Objects-normal/i386/ClassName.o',
+ '/Users/username/Library/Developer/Xcode/DerivedData/App-arcyyktezaigixbocjwfhsjllojz/Build/Products/Debug-iphonesimulator/libPods.a(DuplicateClassName.o)'
+ ]
+ )
+ SAMPLE_DUPLICATE_SYMBOLS.each_line do |line|
+ @parser.parse(line)
+ end
+ end
+
+
it "parses ocunit test run finished" do
@formatter.should receive(:format_test_run_finished).with('ReactiveCocoaTests.octest(Tests)', '2013-12-10 07:03:03 +0000.')
@parser.parse(SAMPLE_OCUNIT_TEST_RUN_COMPLETION)
end