Skip to content

Commit

Permalink
Fix test on Ruby head
Browse files Browse the repository at this point in the history
Ruby head has changed the error message for NameError to use
consistent quoting.
  • Loading branch information
rafaelfranca committed Feb 26, 2024
1 parent 9524b48 commit e43a9cd
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion spec/group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e43a9cd

Please sign in to comment.