test/abstract_command_spec.rb: fix unexpected end-of-input

This commit is contained in:
Thierry Moisan 2025-07-11 16:17:11 -04:00
parent 91f6b7dbf3
commit 6155b84a52
No known key found for this signature in database

View File

@ -11,8 +11,7 @@ RSpec.describe Homebrew::AbstractCommand do
switch "--foo" switch "--foo"
flag "--bar=" flag "--bar="
end end
define_method(:run) do define_method(:run) { nil }
end
end end
stub_const("TestCat", test_cat) stub_const("TestCat", test_cat)
end end
@ -48,10 +47,10 @@ RSpec.describe Homebrew::AbstractCommand do
describe "when command name is overridden" do describe "when command name is overridden" do
before do before do
tac = Class.new(described_class) do tac = Class.new(described_class) do
self.define_singleton_method(:command_name) do define_singleton_method(:command_name) do
"t-a-c" "t-a-c"
define_method(:run) do
end end
define_method(:run) { nil }
end end
stub_const("Tac", tac) stub_const("Tac", tac)
end end