https://github.com/rutaka-n/eredis_mock
simple mock library for eredis
https://github.com/rutaka-n/eredis_mock
eredis mock testing-tools
Last synced: 3 months ago
JSON representation
simple mock library for eredis
- Host: GitHub
- URL: https://github.com/rutaka-n/eredis_mock
- Owner: rutaka-n
- License: apache-2.0
- Created: 2019-04-01T22:52:35.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2019-05-07T10:48:57.000Z (about 6 years ago)
- Last Synced: 2025-01-27T06:32:17.865Z (5 months ago)
- Topics: eredis, mock, testing-tools
- Language: Erlang
- Size: 9.77 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
eredis_mock
=====It is a simple library for mocking eredis queries in tests.
It really terrible to use real redis for tests, especially for unit-tests, so this library allows to mock particular queries for eredis.Example
-----```erlang
{ok, Pid} = eredis_mock:start_link(),
Request = ["SET", "key", "value"],
Response = {ok, <<"MOCK">>},
eredis_mock:set_mock(Redis, Request, Response),
?assertEqual(Response, eredis:q(Redis, Request)),
```Build
-----$ rebar3 compile