From 6a9586663dc100c7a201f0242ada4b8637533948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Busqu=C3=A9?= Date: Tue, 18 Jan 2022 11:15:10 +0100 Subject: [PATCH] Cosmetic changes to the unknown event message - Remove line break. - Wrap each known event within single quotes ('). --- core/lib/spree/event/registry.rb | 5 ++--- core/spec/lib/spree/event/registry_spec.rb | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/core/lib/spree/event/registry.rb b/core/lib/spree/event/registry.rb index 110c31e10ef..d9113903331 100644 --- a/core/lib/spree/event/registry.rb +++ b/core/lib/spree/event/registry.rb @@ -69,10 +69,9 @@ def check_event_name_registered(event_name) All known events are: - '#{event_names.join(" ")}' + '#{event_names.join("', '")}' - You can register the new events at the end of the `spree.rb` - initializer: + You can register the new events at the end of the `spree.rb` initializer: Spree::Event.register('#{event_name}') MSG diff --git a/core/spec/lib/spree/event/registry_spec.rb b/core/spec/lib/spree/event/registry_spec.rb index c65b3d79449..bbd5adba2fd 100644 --- a/core/spec/lib/spree/event/registry_spec.rb +++ b/core/spec/lib/spree/event/registry_spec.rb @@ -115,7 +115,7 @@ expect { registry.check_event_name_registered('foo') - }.to raise_error(/bar.*baz/) + }.to raise_error(/'bar', 'baz'/) end it 'hints on the event name on the error message' do