Last active
August 21, 2017 14:56
-
-
Save userow/13b05bcc14072f2d0d7ca944ab74f32c to your computer and use it in GitHub Desktop.
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
// | |
// CounterSpecs.m | |
// | |
#import <Specta.h> | |
#define EXP_SHORTHAND | |
#import <Expecta.h> | |
#import "Counter.h" | |
SpecBegin(CounterSpecs) | |
/* | |
1) counter | |
*/ | |
describe(@"Counter", ^{ | |
it (@"can be serialied and deserialized", ^{ | |
Counter *cnt = [Counter counterWithIncrement:1 | |
limit:3 | |
current:2]; | |
NSData *encodedObject = [NSKeyedArchiver archivedDataWithRootObject:cnt]; | |
Counter *unnarchived = (Counter *)[NSKeyedUnarchiver unarchiveObjectWithData:encodedObject]; | |
expect(cnt).to.equal(unnarchived); | |
}); | |
}); | |
SpecEnd |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment