From e43a9cd1f9d25ada999e19508216c6052344502f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Mon, 26 Feb 2024 17:39:06 +0000 Subject: [PATCH] Fix test on Ruby head Ruby head has changed the error message for NameError to use consistent quoting. --- spec/group_spec.rb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/spec/group_spec.rb b/spec/group_spec.rb index 660a40d5..6d5a65ee 100644 --- a/spec/group_spec.rb +++ b/spec/group_spec.rb @@ -28,7 +28,11 @@ end it "raises when an exception happens within the command call" do - expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method `this_method_does_not_exist'/) + if RUBY_VERSION < "3.4.0" + expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method `this_method_does_not_exist'/) + else + expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method 'this_method_does_not_exist'/) + end end it "raises an error when a Thor group command expects arguments" do