You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While running specs with --warnings I found an interesting API endpoint under spec/grape/validations/validators/values_spec.rb with a successful test but maybe not the way we wanted.
context'when arity is > 1'doit'returns an error status code'doget'/proc/arity2',input_one: 2,input_two: 3expect(last_response.status).toeq400endend
It will pass but it also emits 2 warnings
Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_one'
Error 'wrong number of arguments (given 1, expected 2)' raised while validating attribute 'input_two'
While running specs with
--warnings
I found an interesting API endpoint underspec/grape/validations/validators/values_spec.rb
with a successful test but maybe not the way we wanted.The api is defined like this
And the test goes like this
It will pass but it also emits 2 warnings
If we take a closer look a the code
:input_one
and:input_two
even if it seems to be.I was wondering if its really a bug. Also, I think we should raise more awareness with proper error instead of a warning.
The text was updated successfully, but these errors were encountered: