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