modocache/Quick — pull request #40 by KeithErmel (2014-06-15 20:44:13+00:00)
Title: Create a workaround fix for issue #20

When a test failed from an expect() outside of an it(),
an exception ('Parameter "test" must not be nil') was thrown
by XCTest upon a call to XCFail().

This was happening because World did not contain any Example
objects, which are created and added via it().

The fix simply adds a boolean flag to QuickSpec indicating whether
or not the spec currently has any invocations. The flag is set by
checking the count of the invocations array at the end of
testInvocations().

This flag is then checked in Expectation.evaluate() before
calling XCFail(). If the flag is NO, we wrap the call to XCFail()
within an it() to prevent the exception from being thrown.