Skip to content

Commit

Permalink
Merge pull request kiwi-bdd#667 from indiegogo/matcher_memory_retain_fix
Browse files Browse the repository at this point in the history
Releasing Verifiers after KWExample run
  • Loading branch information
orta authored Jul 12, 2016
2 parents 84de392 + b920e8f commit 9429e0a
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions Classes/Core/KWExample.m
Original file line number Diff line number Diff line change
Expand Up @@ -117,13 +117,20 @@ - (id)addAsyncVerifierWithExpectationType:(KWExpectationType)anExpectationType c
return verifier;
}

#pragma mark - Clear Verifiers

- (void)clearVerifiers {
[self.verifiers removeAllObjects];
}

#pragma mark - Running examples

- (void)runWithDelegate:(XCTestCase<KWExampleDelegate> *)delegate {
self.delegate = delegate;
[self.matcherFactory registerMatcherClassesWithNamespacePrefix:@"KW"];
[[KWExampleSuiteBuilder sharedExampleSuiteBuilder] setCurrentExample:self];
[self.exampleNode acceptExampleNodeVisitor:self];
[self clearVerifiers];
}

#pragma mark - Reporting failure
Expand Down

0 comments on commit 9429e0a

Please sign in to comment.