test/abstract_command_spec: fix Lint/Syntax error

This commit is contained in:
Carlo Cabrera 2025-07-12 04:15:49 +08:00 committed by Carlo Cabrera
parent 6155b84a52
commit 6082f1372c
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

View File

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