I have a few repetitive specs that I would like to DRY up. The common functionality doesn't lend itself to moving into a beforeEach
block. Essentially, it's object creation and is 4 lines for each of 12 objects, I'd like to turn those 4 lines into a single function call.
Where can I put helper functions in a Kiwi spec?
In RSpec I can just put def
between spec blocks, but that doesn't appear to be possible here. I've even tried skipping the SPEC_END
macro and adding that content myself so I could add functions inside the @implementation from SPEC_BEGIN
but that doesn't seem to work, either.
Correction... I can manage something that kind of works with hand-coding the SPEC_END
macro. I had the end } mis-placed. But still, it fails, because the method isn't in the @interface
.