Skip to content

Commit

Permalink
Add .inspect to error message
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Nov 4, 2017
1 parent debee1f commit 6b99e9d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions lib/dry/core/errors.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
module Dry
module Core
InvalidClassAttributeValue = Class.new(StandardError) do
class InvalidClassAttributeValue < StandardError
def initialize(name, value)
super(
"Value: #{value} is invalid for class attribute: #{name}"
"Value #{value.inspect} is invalid for class attribute #{name.inspect}"
)
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/dry/core/class_attributes_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class NewClass
klass.one 1
}.to raise_error(
Dry::Core::InvalidClassAttributeValue,
'Value: 1 is invalid for class attribute: one'
'Value 1 is invalid for class attribute :one'
)
end
end
Expand Down

0 comments on commit 6b99e9d

Please sign in to comment.