If you re-ran a test, the test was always run on the main thread. This is different behavior from the runs in the complete test suite.
These commits pass along the test group with the test to the detail controller, which then uses the context of the group to re-run the test. It actually creates a new group with the same context, with only (a copy of) the test to re-run in it.
Added initWithGroup to GHTestGroup.
GHUnitIOSTestViewController now requires to be passed a test and its …
setTest: was modified to setTest:group:
This is necessary to properly rerun the test. Without the group the testCase's shouldRunOnMainThread isn't called, giving different behavior from this particular rerun versus the testsuite run.
Thanks for this, i integrated this and it runs fine.
Not sure if I've read this correctly, but I've just encountered a problem where a test works fine when run from the suite view, but crashes when run from the test view. The issue is the test includes threading code which assumes that it is not running on the main thread, but GHUnit runs the test on the main thread when the Run button is tapped.
I think I have the inverse of this bug in that I don't want it run on the main thread.
My changes will fix that.
Is this relevant for the current master?
Yes, it's still relevant.