Skip to content

Commit e43a9cd

Browse files
committed
Fix test on Ruby head
Ruby head has changed the error message for NameError to use consistent quoting.
1 parent 9524b48 commit e43a9cd

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

spec/group_spec.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,11 @@
2828
end
2929

3030
it "raises when an exception happens within the command call" do
31-
expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method `this_method_does_not_exist'/)
31+
if RUBY_VERSION < "3.4.0"
32+
expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method `this_method_does_not_exist'/)
33+
else
34+
expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method 'this_method_does_not_exist'/)
35+
end
3236
end
3337

3438
it "raises an error when a Thor group command expects arguments" do

0 commit comments

Comments
 (0)