title: OCMock Class Method Not Working
body: <p>I am trying to mock a class method that identifies if the iOS is iOS 6 (or earlier) or iOS 7 (or later). Here is the testing code:</p>
  
  <pre><code>id iOSDetectorMock = [OCMockObject mockForClass:[UTiOSVersionDetector class]];
  [[[iOSDetectorMock stub] andReturnValue:@(YES)] isIOS6_Earlier];
  UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:self.homeViewController];
  [self.homeViewController loadView];
  [self.homeViewController viewDidLoad];
  XCTAssertTrue([self.homeViewController.navigationController.navigationBar.tintColor isEqual:Color_Dark_Green], @"Navigation bar tint color is not correct");
  [iOSDetectorMock stopMocking];
  navController = nil;
  </code></pre>
  
  <p>However, the method <code>isIOS6_Earlier</code> keeps on returning NO neglecting the mock I used. The original code of <code>UTiOSVersionDetector</code> is below:</p>
  
  <pre><code>+ (BOOL) isIOS6_Earlier {
  
  if ([[[UIDevice currentDevice] systemVersion] intValue] &lt;= 6) {
      return YES;
  }
  
  return NO;
  
  }
  </code></pre>
  
  <p>Edit: I am testing on Xcode 5.1, yet it exists on Xcode 5.0.2 too.</p>