Skip to content

Commit

Permalink
Test invalid exception message
Browse files Browse the repository at this point in the history
  • Loading branch information
flash-gordon committed Dec 14, 2019
1 parent 954a1c2 commit 1af5729
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions spec/dry/types/errors_spec.rb
@@ -0,0 +1,11 @@
# frozen_string_literal: true

RSpec.describe 'dry types errors' do
describe Dry::Types::CoercionError do
it 'requires a string message' do
expect {
described_class.new(:invalid)
}.to raise_error(ArgumentError, /message must be a string/)
end
end
end

0 comments on commit 1af5729

Please sign in to comment.