Skip to content

Commit ae1154d

Browse files
mostlyobviousfidel
authored andcommitted
Rename to match passed arguments
1 parent e64b81c commit ae1154d

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

ruby_event_store/lib/ruby_event_store/instrumented_repository.rb

+4-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def initialize(repository, instrumentation)
88
end
99

1010
def append_to_stream(records, stream, expected_version)
11-
instrumentation.instrument("append_to_stream.repository.ruby_event_store", events: records, stream: stream) do
11+
instrumentation.instrument("append_to_stream.repository.ruby_event_store", records: records, stream: stream) do
1212
repository.append_to_stream(records, stream, expected_version)
1313
end
1414
end
@@ -37,9 +37,9 @@ def count(specification)
3737
end
3838
end
3939

40-
def update_messages(messages)
41-
instrumentation.instrument("update_messages.repository.ruby_event_store", messages: messages) do
42-
repository.update_messages(messages)
40+
def update_messages(records)
41+
instrumentation.instrument("update_messages.repository.ruby_event_store", records: records) do
42+
repository.update_messages(records)
4343
end
4444
end
4545

ruby_event_store/spec/instrumented_repository_spec.rb

+6-2
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ module RubyEventStore
2424
subscribe_to("append_to_stream.repository.ruby_event_store") do |notification_calls|
2525
instrumented_repository.append_to_stream([record], stream, expected_version)
2626

27-
expect(notification_calls).to eq([{ events: [record], stream: stream }])
27+
expect(notification_calls).to eq([
28+
{ records: [record], stream: stream }
29+
])
2830
end
2931
end
3032
end
@@ -143,7 +145,9 @@ module RubyEventStore
143145
subscribe_to("update_messages.repository.ruby_event_store") do |notification_calls|
144146
instrumented_repository.update_messages([record])
145147

146-
expect(notification_calls).to eq([{ messages: [record] }])
148+
expect(notification_calls).to eq([
149+
{ records: [record] }
150+
])
147151
end
148152
end
149153
end

0 commit comments

Comments
 (0)