-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Labels
Description
It probably never happened but defining a optional parameter with a message attribute will raise an exception.
The following test will fail.
context 'optional param with message' do
let(:app) do
Class.new(described_class) do
params do
optional 'test', message: 'is required'
end
get 'test'
end
end
before do
end
it 'should return a message' do
expect { get 'test' }.not_to raise_error
end
end
It's an easy fix where we need to remove the message
key even if presence is not required.