nebulab / simple_command

A simple, standardized way to build and use Service Objects (aka Commands) in Ruby
http://nebulab.it
MIT License
624 stars 55 forks source link

version 0.1.0 brakes add_multiple_errors #23

Open vdaubry opened 4 years ago

vdaubry commented 4 years ago

When calling add_multiple_errors with an error hash i get NoMethodError: undefined methodeach' for #`

I have an error object from another command object, when i call add_multiple_errors it works with version 0.9.0 and raises a NoMethodError error with 0.1.0:

>command.errors
:error=>["21004 The shared secret you provided does not match the shared secret on file for your account."]}
>errors.add_multiple_errors(command.errors)
NoMethodError: undefined method `each' for #<String:0x00007ff1cd1a8710>
kennyadsl commented 4 years ago

Thanks for reporting, can you please provide a breaking spec for this scenario?