diff options
Diffstat (limited to 'spec/spec_helper.rb')
-rw-r--r-- | spec/spec_helper.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 921d6503099..091627c8a38 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -506,3 +506,16 @@ module TouchRackUploadedFile end Rack::Test::UploadedFile.prepend(TouchRackUploadedFile) + +# Monkey-patch to enable ActiveSupport::Notifications for Redis commands +module RedisCommands + module Instrumentation + def process(commands, &block) + ActiveSupport::Notifications.instrument('redis.process_commands', commands: commands) do + super(commands, &block) + end + end + end +end + +Redis::Client.prepend(RedisCommands::Instrumentation) |