From 43936ac719ee524fd0f8ccd830d1eb50abd721c7 Mon Sep 17 00:00:00 2001 From: Hermann Mayer Date: Mon, 4 Oct 2021 18:35:45 +0200 Subject: [PATCH] Fixed the broken ruby-head NoMethodError spec. (#2193) Signed-off-by: Hermann Mayer Co-authored-by: Daniel Doubrovkine (dB.) --- CHANGELOG.md | 1 + spec/grape/api_spec.rb | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c5cd79ecc..b6998446bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ #### Fixes +* [#2193](/~https://github.com/ruby-grape/grape/pull/2193): Fixed the broken ruby-head NoMethodError spec - [@Jack12816](/~https://github.com/Jack12816). * [#2192](/~https://github.com/ruby-grape/grape/pull/2192): Memoize the result of Grape::Middleware::Base#response - [@Jack12816](/~https://github.com/Jack12816). * Your contribution here. diff --git a/spec/grape/api_spec.rb b/spec/grape/api_spec.rb index e38a8a1489..576925e9f4 100644 --- a/spec/grape/api_spec.rb +++ b/spec/grape/api_spec.rb @@ -2272,7 +2272,7 @@ def rescue_no_method_error subject.rescue_from :all, with: :not_exist_method subject.get('/rescue_method') { raise StandardError } - expect { get '/rescue_method' }.to raise_error(NoMethodError, 'undefined method `not_exist_method\'') + expect { get '/rescue_method' }.to raise_error(NoMethodError, /^undefined method `not_exist_method'/) end it 'correctly chooses exception handler if :all handler is specified' do