forked from kiwi-bdd/Kiwi
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request kiwi-bdd#221 from drewag/master
Fix the hiding of true failure reason if no callSite is set on KWFailure
- Loading branch information
Showing
3 changed files
with
35 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// | ||
// KWFailureTest.m | ||
// Kiwi | ||
// | ||
// Created by Andrew J Wagner on 2/20/13. | ||
// Copyright (c) 2013 Allen Ding. All rights reserved. | ||
// | ||
|
||
#import "KiwiTestConfiguration.h" | ||
#import "TestClasses.h" | ||
#import "KWFailure.h" | ||
|
||
@interface KWFailureTest : SenTestCase | ||
|
||
@end | ||
|
||
@implementation KWFailureTest | ||
|
||
- (void)testExceptionValue { | ||
KWFailure *failure = [KWFailure failureWithCallSite:nil message:@"a message"]; | ||
STAssertNil([failure exceptionValue].userInfo, @"userInfo should be nil since there was no callSite"); | ||
STAssertEquals([failure exceptionValue].reason, @"a message", @"the reason of the exception should be the same as the one used to create the failure"); | ||
} | ||
|
||
@end |