Revert "Disable audit_result in inreplace"
This reverts commit f31e93a73aab025e60a4a798031c73327cef45cb.
This commit is contained in:
parent
f31e93a73a
commit
2225af5bef
@ -25,7 +25,7 @@ RSpec.describe Utils::Inreplace do
|
||||
it "raises error if there is nothing to replace" do
|
||||
expect do
|
||||
described_class.inreplace file.path, "d", "f"
|
||||
end.not_to raise_error(Utils::Inreplace::Error)
|
||||
end.to raise_error(Utils::Inreplace::Error)
|
||||
end
|
||||
|
||||
it "raises error if there is nothing to replace in block form" do
|
||||
|
||||
@ -50,7 +50,7 @@ module Utils
|
||||
block: T.nilable(T.proc.params(s: StringInreplaceExtension).void),
|
||||
).void
|
||||
}
|
||||
def self.inreplace(paths, before = nil, after = nil, audit_result: false, &block)
|
||||
def self.inreplace(paths, before = nil, after = nil, audit_result: true, &block)
|
||||
paths = Array(paths)
|
||||
after &&= after.to_s
|
||||
before = before.to_s if before.is_a?(Pathname)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user