Skip to content

Instantly share code, notes, and snippets.

@dcrosby42
Created July 21, 2011 15:53
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcrosby42/1097497 to your computer and use it in GitHub Desktop.
Save dcrosby42/1097497 to your computer and use it in GitHub Desktop.
objection module spec
#import "SpecHelper.h"
#import "CrozSpecialObjectionModule.h"
SPEC_BEGIN(CrozSpecialObjectionModuleSpec)
describe(@"ClassName", ^{
__block CrozSpecialObjectionModule *target = nil;
__block UIWindow *window = nil;
beforeEach(^{
window = [[[UIWindow alloc] initWithFrame:CGRectZero]autorelease];
target = [[[CrozSpecialObjectionModule alloc]initWithWindow:window]autorelease];
[target configure];
});
it(@"configures external objection dependencies", ^{
NSDictionary *bindings = target.bindings;
[[theValue(bindings.count) should]equal:theValue(1)];
[[[[bindings objectForKey:@"UIWindow"] extractObject]should] equal:window];
});
});
SPEC_END
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment