From be6dedcf0e91469a911538d8d86ddbba678dc325 Mon Sep 17 00:00:00 2001 From: Jim Gay Date: Wed, 23 Oct 2024 13:53:35 -0400 Subject: [PATCH] Fix incorrect spec with Pundit 2.4 --- CHANGELOG.md | 4 ++++ spec/pundit/custom_exception_spec.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6641800..45779ae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file. ## [0.1.4] - Unreleased +### Fixed + +- Fixed incorrect spec after Pundit 2.4 release. + ## [0.1.3] - 2024-10-23 ### Added diff --git a/spec/pundit/custom_exception_spec.rb b/spec/pundit/custom_exception_spec.rb index 31528f7..98b8ffc 100644 --- a/spec/pundit/custom_exception_spec.rb +++ b/spec/pundit/custom_exception_spec.rb @@ -59,6 +59,6 @@ def exception_from(query:) expect do Pundit.authorize(user, record, query) - end.to raise_error(Pundit::NotAuthorizedError).with_message(/not allowed to create?/) + end.to raise_error(Pundit::NotAuthorizedError).with_message(/not allowed to UserPolicy#create?/) end end