Skip to content

Commit 9c85f0c

Browse files
pjurewiczfidel
authored andcommitted
improve mutant coverage
1 parent 446e9f2 commit 9c85f0c

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

ruby_event_store-active_record/lib/ruby_event_store/active_record/event_repository_reader.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ def start_condition(specification)
140140
@stream_klass.table_name
141141
)
142142
rescue ::ActiveRecord::RecordNotFound
143-
raise RubyEventStore::EventNotFoundInStream.new(specification.start)
143+
raise EventNotFoundInStream
144144
end
145145

146146
def stop_condition(specification)
@@ -150,7 +150,7 @@ def stop_condition(specification)
150150
@stream_klass.table_name
151151
)
152152
rescue ::ActiveRecord::RecordNotFound
153-
raise RubyEventStore::EventNotFoundInStream.new(specification.stop)
153+
raise EventNotFoundInStream
154154
end
155155

156156
def start_condition_in_global_stream(specification)
@@ -160,7 +160,7 @@ def start_condition_in_global_stream(specification)
160160
@event_klass.table_name
161161
)
162162
rescue ::ActiveRecord::RecordNotFound
163-
raise RubyEventStore::EventNotFound.new(specification.start)
163+
raise EventNotFound.new(specification.start)
164164
end
165165

166166
def stop_condition_in_global_stream(specification)
@@ -170,7 +170,7 @@ def stop_condition_in_global_stream(specification)
170170
@event_klass.table_name
171171
)
172172
rescue ::ActiveRecord::RecordNotFound
173-
raise RubyEventStore::EventNotFound.new(specification.stop)
173+
raise EventNotFound.new(specification.stop)
174174
end
175175

176176
def coalesce(*exprs)

ruby_event_store/lib/ruby_event_store/spec/event_repository_lint.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1075,14 +1075,14 @@ def read_events_backward(repository, stream = nil, from: nil, to: nil, count: ni
10751075
not_existing_uuid = SecureRandom.uuid
10761076
expect do
10771077
repository.read(specification.from(not_existing_uuid).result).to_a
1078-
end.to raise_error(RubyEventStore::EventNotFound)
1078+
end.to raise_error(RubyEventStore::EventNotFound, "Event not found: #{not_existing_uuid}")
10791079
end
10801080

10811081
specify do
10821082
not_existing_uuid = SecureRandom.uuid
10831083
expect do
10841084
repository.read(specification.to(not_existing_uuid).result).to_a
1085-
end.to raise_error(RubyEventStore::EventNotFound)
1085+
end.to raise_error(RubyEventStore::EventNotFound, "Event not found: #{not_existing_uuid}")
10861086
end
10871087

10881088
context "#update_messages" do

0 commit comments

Comments
 (0)