Skip to content

Can't mock class method in Pod target #67

Closed
@badeleux

Description

@badeleux

I am trying to mock static method in AFDownloadRequestOperation class (which is in Pods target)

id requestOperation = [OCMockObject mockForClass:[AFDownloadRequestOperation class]];
[[[[requestOperation stub] classMethod]andReturn:@"/Volumes/test5M"] cacheFolder];

In test file when I am trying to invoke this method, result is predictably correct, but when I am invoking this method in project target it turns out that method cacheFolder doesn't return @"/Volumes/test5M".

Is there any known issue that OCMock can't stub class methods in Pods target?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions