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 e24a280
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion spec/group_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,14 @@
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.alpha"
puts RUBY_VERSION
expect { BrokenCounter.start(%w(1 2 --fail)) }.to raise_error(NameError, /undefined local variable or method `this_method_does_not_exist'/)
else
puts RUBY_VERSION

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 e24a280

Please sign in to comment.