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
#import "Kiwi.h" | |
SPEC_BEGIN(SampleSpec) | |
describe(@"MeetAppApiManager", ^{ | |
it(@"test case", ^{ | |
Sample *sample = [[Sample alloc] init]; | |
[sample stub:@selector(hoge:) andReturn:@"hoge"]; | |
TestTarget *target = [[TestTarget alloc] init]; |
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
#import <Foundation/Foundation.h> | |
@class FBSession, FBProfilePictureView, FBRequest; | |
@interface FacebookManager : NSObject | |
@property (strong, readonly) FBSession* session; | |
+ (FacebookManager*)sharedManager; | |
- (void)login; |
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
#import <FacebookSDK/FacebookSDK.h> | |
#import "FacebookManager.h" | |
@implementation FacebookManager | |
static FacebookManager* _FacebookManager; | |
+ (FacebookManager*)sharedManager; | |
{ | |
static dispatch_once_t onceToken; | |
dispatch_once(&onceToken, ^{ |
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
#import "Kiwi.h" | |
#import "FacebookManager.h" | |
SPEC_BEGIN(FacebookManagerSpec) | |
describe(@"FacebookManager", ^{ | |
__block FacebookManager *manager = [FacebookManager sharedManager]; | |
context(@"sessionが開いてるとき", ^{ | |
beforeAll(^{ |
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
@interface User : RLMObject | |
@property(setter=setHoge:, getter=hoge) NSString *name; | |
@end | |
RLM_ARRAY_TYPE(User) | |
@implementation User |
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
@interface User : RLMObject | |
@property NSString *name; | |
@end | |
RLM_ARRAY_TYPE(User) | |
@implementation User |
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
@interface User : RLMObject | |
@property(setter=setHoge:, getter=hoge) NSString *name; | |
@end | |
RLM_ARRAY_TYPE(User) | |
@implementation User |
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
#import <Foundation/Foundation.h> | |
#import <objc/objc-runtime.h> | |
@interface NSObject (Methods) | |
- (NSArray *)methods; | |
- (NSArray *)methodsUntilRoot; | |
// TODO: classメソッド関連 |
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
#import <Foundation/Foundation.h> | |
@interface AbstractClass : NSObject | |
- (instancetype)init __attribute__((unavailable("AbstractClass cannot be created directly"))); | |
+ (instancetype)new __attribute__((unavailable("AbstractClass cannot be created directly"))); | |
@end | |
@implementation AbstractClass |
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
#import <Foundation/Foundation.h> | |
@interface ASNDynamicProxy : NSProxy | |
@property (strong, nonatomic) NSObject *targetObject; | |
@end | |
@implementation ASNDynamicProxy |
OlderNewer