mirror of
https://github.com/Homebrew/brew.git
synced 2025-07-14 16:09:03 +08:00
Fix Lint/EmptyBlock
warning
These blocks are intentionally empty.
This commit is contained in:
parent
6082f1372c
commit
b30bcea288
@ -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
|
||||
|
@ -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/)
|
||||
|
Loading…
x
Reference in New Issue
Block a user