Analysis updated 2026-07-14 · repo last pushed 2026-06-22
Test caching or session logic in a Ruby app without installing a real Redis server.
Run your test suite in CI without spinning up an extra Redis service.
Develop and test Redis-dependent code on your laptop with zero infrastructure setup.
| sds/mock_redis | fastlane/watchbuild | mitchellh/net-ssh-shell | |
|---|---|---|---|
| Stars | 505 | 328 | 79 |
| Language | Ruby | Ruby | Ruby |
| Last pushed | 2026-06-22 | 2021-10-26 | 2015-03-27 |
| Maintenance | Active | Dormant | Dormant |
| Setup difficulty | easy | easy | easy |
| Complexity | 2/5 | 2/5 | 2/5 |
| Audience | developer | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Just add the gem to your Gemfile and replace Redis.new with MockRedis.new in your tests.
The mock_redis project gives Ruby developers a way to simulate a Redis database entirely in memory, without needing an actual Redis server running. Redis is a popular tool for storing data quickly, things like caches, session info, or counters, but setting one up just to run tests can be a hassle. This gem lets your code behave as if it's talking to Redis, when really it's just using a lightweight stand-in. At a high level, it works by providing an object that responds to the same commands real Redis does, get, set, increment, and so on. Your application code talks to it the same way it would talk to a real Redis instance, but the data never leaves your Ruby process. It's all held in memory and disappears when your program stops running. This is primarily useful for testing. If you're building a Ruby app and you write tests to make sure your caching or session logic works, you'd normally need a Redis server available in your test environment. With this gem, you can skip that setup. It's handy for solo developers who don't want to install Redis on their laptop just to run tests, or for teams running tests in CI pipelines where spinning up extra services adds time and complexity. The project's README doesn't go into detail beyond the basics, so information on supported commands, limitations, or configuration options would need to be found in the code itself or the test suite. The main tradeoff to keep in mind is that this is a mock, it won't replicate every behavior of real Redis, especially around persistence, replication, or performance under load. It's designed to make testing easier, not to replace Redis in production.
A Ruby gem that simulates a Redis database in memory so you can run tests without needing a real Redis server. It responds to the same commands but data disappears when your program stops.
Mainly Ruby. The stack also includes Ruby, Redis, Gem.
Active — commit in last 30 days (last push 2026-06-22).
No license information is provided in the explanation, so the terms of use are unknown.
Setup difficulty is rated easy, with roughly 5min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.