File tree Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Expand file tree Collapse file tree 2 files changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,8 @@ - (void)addStub:(OCMInvocationStub *)aStub
89
89
90
90
- (void )prepareClassForClassMethodMocking
91
91
{
92
- /* haven't figured out how to work around runtime dependencies on NSString, so exclude it for now */
93
- if ([[mockedClass class ] isSubclassOfClass: [NSString class ]])
92
+ /* the runtime and OCMock depend on string and array; we don't intercept methods on them to avoid endless loops */
93
+ if ([[mockedClass class ] isSubclassOfClass: [NSString class ]] || [[mockedClass class ] isSubclassOfClass: [ NSArray class ]] )
94
94
return ;
95
95
96
96
/* if there is another mock for this exact class, stop it */
Original file line number Diff line number Diff line change @@ -118,6 +118,13 @@ - (void)testCanStubValueForKeyMethod
118
118
}
119
119
120
120
121
+ - (void )testCanMockNSMutableArray
122
+ {
123
+ id mock = [OCMockObject niceMockForClass: [NSMutableArray class ]];
124
+ id anArray = [[NSMutableArray alloc ] init ];
125
+ }
126
+
127
+
121
128
- (void )testForwardsIsKindOfClass
122
129
{
123
130
id mock = [OCMockObject mockForClass: [NSString class ]];
You can’t perform that action at this time.
0 commit comments