-
Notifications
You must be signed in to change notification settings - Fork 157
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Resolves #278 Seems like everything is working; however, I'm not sure if moving `#call` from `MockRedis` to `MockRedis::Database` has some side-effects -- is there a reason `call` was separated from other commands? I also changed `send` to `public_send` in `call` implementation (seems to be OK, I'm not sure if there are any edge cases when calling private is a usecase). Also, I think we should allow mix-cased variants of Redis methods (`RedisMock.new.call(["GET", 123])` does not work right now, but redis commands are case insensitive). Usage example: ```ruby redis = MockRedis.new redis.pipelined do |pipeline| pipeline.call(["get", "foo"]) pipeline.call(["get", "bar"]) end ``` Co-authored-by: ya2k <[email protected]>
- Loading branch information
1 parent
36435ec
commit 29961e0
Showing
3 changed files
with
26 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters