ryanmasondavies / Inline

Write your tests any way you want.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Inject, don't adapt? No.

ryanmasondavies opened this issue · comments

The structure of Inline is non-optimal, and would be much cleaner if it did not have to conform to the poor structure of SenTestingKit. Injecting involves swizzling SenTestProbe to run Inline tests.

It has become evident that the structure of Inline can only be ideal by avoiding SenTestingKit, because it requires the use of invocations. Instead, we can use a tree structure and the visitor pattern to run hooks and tests - a much better structure.

It has since become evident that I must have been very tired when I made the previous decision. Adapting allows SenTestingKit to handle both running tests, timing them, and reporting them, regardless of its internal structure. All we need to do is feed it names and invocations - both can be handled by passing a compiler through the tree structure that now exists. This conversion wasn't for nothing.