spec/grape/validations/instance_behaivour_spec.rb in grape-1.2.5 vs spec/grape/validations/instance_behaivour_spec.rb in grape-1.3.0

- old
+ new

@@ -1,13 +1,15 @@ +# frozen_string_literal: true + require 'spec_helper' describe 'Validator with instance variables' do let(:validator_type) do Class.new(Grape::Validations::Base) do def validate_param!(_attr_name, _params) if @instance_variable - raise Grape::Exceptions::Validation, params: ['params'], - message: 'This should never happen' + raise Grape::Exceptions::Validation.new(params: ['params'], + message: 'This should never happen') end @instance_variable = true end end end