Skip to content

Instantly share code, notes, and snippets.

@hammerdr
Created February 26, 2010 22:07
Show Gist options
  • Save hammerdr/316226 to your computer and use it in GitHub Desktop.
Save hammerdr/316226 to your computer and use it in GitHub Desktop.
var oldGraphicsContext = CPGraphicsContext;
try {
CPGraphicsContext = moq();
[CPGraphicsContext selector:@selector(currentContext) returns:moq()];
// your test here
} finally {
CPGraphicsContext = oldGraphicsContext;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment