Skip to content

Commit

Permalink
Merge pull request #4246 from nebulab/waiting-for-dev/registration_er…
Browse files Browse the repository at this point in the history
…ror_msg

Cosmetic changes to the unknown event message
  • Loading branch information
waiting-for-dev authored Jan 19, 2022
2 parents 65a26af + 6a95866 commit 99348fc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions core/lib/spree/event/registry.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/spec/lib/spree/event/registry_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 99348fc

Please sign in to comment.