Alica's dev blog
Where to find docs for Rhino Mocks?

TL;DR

The official Rhino Mocks documentation is not available anymore. You can find an old snapshot in the Wayback Machine.

Introduction

You start working on an existing codebase. You realise that it uses a library that you are not familiar with. You are a well-behaved developer, so of course you won’t ask your colleagues immediately. Instead, you will just go and RTFM.

This would be an ideal scenario. But what if the documentation isn’t there anymore?

My case with Rhino Mocks

That’s what happened to me recently. I had seen Rhino Mocks being used all around the test suite. I even used simple Stub() method in my tests, because I could understand its use from the examples in the code.

But there were also other method calls like Expect.Call(), ReplayAll() or VerifyAllExpectations. I had no idea what they did. I tried to google, but I found only StackOverflow threads that were mostly from 2011-2012, sometimes 2016-2017 (I am writing this in 2024). I found a repo that had a link to a wiki and the wiki looked like this:

Rhino Mocks wiki gives you 500 error

For me, that was a totally new experience. Is this real? Am I really working with the code that is so old that it uses a library that doesn’t even have the documentation anymore? It’s not that it never existed – it’s just not available anymore. Is this what working with legacy code actually means?

Instead of searching deeper, I rather avoided Rhino Mocks, until at one point, I couldn’t. I added a new method to an interface that was mocked in the tests, and suddenly tests which were totally unrelated to my changes started failing. I was confused – I didn’t touch anything in the existing methods, I only added a new method, so how could that affect the existing tests? Those tests contained all those “mysterious” methods from Rhino Mocks, and I had to understand them in order to fix the failing tests.

Creating my own Rhino Mocks documentation

Now that the official documentation was out of question, I started asking around. My rationale was that if it’s part of the codebase, and there are many people working on that codebase, some of them (especially those which work on the project for a long time) should know how to use this library. I mostly got answers in style of “yeah it’s there, it’s old, there is no documentation”.

So I discussed with my team lead that I would start an initiative – if there is no documentation, I will create it. It would contain some basic principles of mocking, stubbing, AAA syntax (this terms popped up quite often in StackOverflow threads) etc.

I found a couple of blog posts that helped me to understand those basic terms and planned to create a summary of them:

Then I got an idea to try the Wayback Machine and it was there!

Latest info on Rhino Mocks

The last snapshot of the documentation was from 2018.

It is for version 3.5. It is not the newest one - the github repo from the original author says there was 3.6. But let’s hope there were no big changes from 3.5 to 3.6.

Then, there was a 4.0.0 Alpha released in 2014 by the person who took over the project in 2013. However, it’s the last post in Rhino Mocks category on their blog. The Google group (mentioned by the original author when handing over the project) seems to be dead.

Summary

It’s 2024 and I am working with code that uses a library that has been dead since 2014. I guess that is something that comes with working with a legacy codebase. It also shows that it is important to have backups of the documentation. Big thanks to the Wayback Machine (it is also possible to support the Internet Archive project that hosts the Wayback Machine)!


Last modified on 2024-06-11