Fix Lint/EmptyBlock warning

These blocks are intentionally empty.
This commit is contained in:
Carlo Cabrera 2025-07-12 04:20:56 +08:00 committed by Carlo Cabrera
parent 6082f1372c
commit b30bcea288
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0
2 changed files with 7 additions and 2 deletions

View File

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

View File

@ -23,6 +23,7 @@ RSpec.describe Formula do
expect do
formula do
define_method(:brew) do
nil
end
end
end.to raise_error(RuntimeError, /\AThe method `brew` on #{described_class} was declared as final/)