title: How to unit test custom implementation of drawRect
body: <p>I am trying to write a test/s using XCTest to drive out the implementation of a custom implementation of the drawRect method and am unsure how to do this. </p>
  
  <p>The code I am looking to have to write because of a test/s is as follows:</p>
  
  <pre><code>- (void)drawRect:(CGRect)rect
  {
      CGPoint startOfHorizontalLine = (CGPointMake(1.0f, 0.0f));
      CGPoint endOfHorizontalLine = (CGPointMake(1.0f, 10.0f));
  
      UIColor * lineColour = [UIColor colorWithRed:40.0f/255.0f green:34.0f/255.0f  blue:34.0f/255.0f alpha:1.0f];
      [lineColour setStroke];
  
      UIBezierPath *horizontalLine = [UIBezierPath bezierPath];
      [horizontalLine moveToPoint:startOfHorizontalLine];
      [horizontalLine addLineToPoint:endOfHorizontalLine];
      [horizontalLine stroke];
  }
  </code></pre>
  
  <p>If I need to use a mocking library, I have done some research into OCMock.</p>
  
  <p>Thank you for the help.</p>