Skip to content

Instantly share code, notes, and snippets.

@saikat
Created September 19, 2009 23:50
Show Gist options
  • Save saikat/189636 to your computer and use it in GitHub Desktop.
Save saikat/189636 to your computer and use it in GitHub Desktop.
[Test for: ScreensPanel
beforeEach: function() {
this.window = [Mock a:CPWindow as:"" withStubs:nil];
this.screensPanel = [[ScreensPanel alloc] initWithFrame:CGRectMake(0, 0,
ScreensPanelSize.width,
ScreensPanelSize.height)
parentEditView:nil];
// This fails
// [this.screensPanel setWindow:this.window]
this.screensPanel._window = this.window;
}
checking: function() {
[ScreensPanel should: "blah blah"
by: function() {
[this.window expects:@selector(setDelegate:)
with:nil
returning:""];
}]
}]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment