Skip to content

Instantly share code, notes, and snippets.

@rudyjahchan
Created July 19, 2011 20:26
Show Gist options
  • Save rudyjahchan/1093622 to your computer and use it in GitHub Desktop.
Save rudyjahchan/1093622 to your computer and use it in GitHub Desktop.
A desire to have factories
__block SignInController* _signInController;
__block UITextField* _emailTextField;
__block UITextField* _passwordTextField;
__block UIGradientButton* _signInButton;
__block UIView* _signingInView;
__block UILabel* _signedInLabel;
beforeEach(^{
_signInController = [[SignInController new] autorelease];
_emailTextField = [[UITextField new] autorelease];
_emailTextField.enabled = YES;
_signInController.emailField = _emailTextField;
_passwordTextField = [[UITextField new] autorelease];
_signInController.passwordField = _passwordTextField;
_emailTextField.text = @"email@example.com";
_passwordTextField.text = @"password";
_signInButton = [[UIButton new] autorelease];
_signInController.signInButton = _signInButton;
_signingInView = [[UIView new] autorelease];
_signingInView.hidden = YES;
_signInController.signingInView = _signingInView;
_signedInLabel = [[UILabel new] autorelease];
_signedInLabel.hidden = YES;
_signInController.signedInLabel = _signedInLabel;
});
__block SignInController* _signInController;
beforeEach(^{
_signInController = [Factory build:@"signInController"];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment