SOLVED – Returning A Block From An OCMock Stub


Picture iof text which reads [ObjC]

Problem

You want to return a block from an OCMock stub method, something like this :

[[[the_mock stub] andReturn:the_block] method];

That should work, right ? According to the blocks docs :

Blocks are Objective-C objects, which means they can be added to collections like NSArray or NSDictionary.

But it doesn’t work, and OCMock throws you an exception along the lines of Expected invocation with object return type. Did you mean to use andReturnValue: instead?



Fixing Git SSH Errors With Jenkins On OS X


generic picture of a keyboard

The Problem

So you installed Jenkins on OS X using the .pkg installer (you’ll regret that, I promise), you’ve set up all your SSH keys correctly on the server and client – at least, you think you have, see later – but when you try and point a new job at your git repo, you get an error, like this one :

Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Or this one :

Failed to connect to repository : Command "git ls-remote -h ssh://git@localhost/Users/git/Repos/HelloCI/ HEAD" returned status code 128:
stdout: 
stderr: Permission denied (publickey,gssapi-keyex,gssapi-with-mic,keyboard-interactive). 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.




Built With Bootstrap
Powered By Wordpress
Coded By Enigmatic Ape