From 0611e3505aaf6de5a01ab31022228e13273531cd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Pacana?= Date: Fri, 15 Jan 2021 02:04:48 +0100 Subject: [PATCH] Rename to match passed arguments --- .../lib/ruby_event_store/instrumented_repository.rb | 8 ++++---- ruby_event_store/spec/instrumented_repository_spec.rb | 8 ++++++-- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb b/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb index 384452e7f2..b2133a1794 100644 --- a/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb +++ b/ruby_event_store/lib/ruby_event_store/instrumented_repository.rb @@ -8,7 +8,7 @@ def initialize(repository, instrumentation) end def append_to_stream(records, stream, expected_version) - instrumentation.instrument("append_to_stream.repository.ruby_event_store", events: records, stream: stream) do + instrumentation.instrument("append_to_stream.repository.ruby_event_store", records: records, stream: stream) do repository.append_to_stream(records, stream, expected_version) end end @@ -37,9 +37,9 @@ def count(specification) end end - def update_messages(messages) - instrumentation.instrument("update_messages.repository.ruby_event_store", messages: messages) do - repository.update_messages(messages) + def update_messages(records) + instrumentation.instrument("update_messages.repository.ruby_event_store", records: records) do + repository.update_messages(records) end end diff --git a/ruby_event_store/spec/instrumented_repository_spec.rb b/ruby_event_store/spec/instrumented_repository_spec.rb index bd583e914b..65e50bdb87 100644 --- a/ruby_event_store/spec/instrumented_repository_spec.rb +++ b/ruby_event_store/spec/instrumented_repository_spec.rb @@ -24,7 +24,9 @@ module RubyEventStore subscribe_to("append_to_stream.repository.ruby_event_store") do |notification_calls| instrumented_repository.append_to_stream([record], stream, expected_version) - expect(notification_calls).to eq([{ events: [record], stream: stream }]) + expect(notification_calls).to eq([ + { records: [record], stream: stream } + ]) end end end @@ -143,7 +145,9 @@ module RubyEventStore subscribe_to("update_messages.repository.ruby_event_store") do |notification_calls| instrumented_repository.update_messages([record]) - expect(notification_calls).to eq([{ messages: [record] }]) + expect(notification_calls).to eq([ + { records: [record] } + ]) end end end