Files
MonsterCards/Pods/OCHamcrest/Source/Library/Text/HCStringEndsWith.m
Tom Hicks bab5a55c3b Adds cocoapods for libraries.
Adds OCMockito and OCHamcrest libs.
2020-09-05 22:06:51 -07:00

29 lines
498 B
Objective-C

// OCHamcrest by Jon Reid, https://qualitycoding.org/
// Copyright 2019 hamcrest.org. See LICENSE.txt
#import "HCStringEndsWith.h"
@implementation HCStringEndsWith
- (BOOL)matches:(nullable id)item
{
if (![item respondsToSelector:@selector(hasSuffix:)])
return NO;
return [item hasSuffix:self.substring];
}
- (NSString *)relationship
{
return @"ending with";
}
@end
id HC_endsWith(NSString *suffix)
{
return [[HCStringEndsWith alloc] initWithSubstring:suffix];
}