Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion Sources/Nimble/objc/CurrentTestCaseTracker.m
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ @implementation CurrentTestCaseTracker (Register)

+ (void)load {
CurrentTestCaseTracker *tracker = [CurrentTestCaseTracker sharedInstance];
[[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker];
// XCode 7.3 introduced a bug where early registration of a test observer prevented
// default XCTest test observer from being registered. That caused no longs being printed
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo longs -> logs; XCode -> Xcode

thanks for the quick PR!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch! Let's fix this in another PR/commit.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

created #272 to address this 👍

// onto console, which in result broke several tools that relied on this.
// In order to go around the issue we're deferring registration to allow default
// test observer to register first.
dispatch_async(dispatch_get_main_queue(), ^{
[[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker];
});
}

@end