Revert "Disable audit_result in inreplace"

This reverts commit f31e93a73aab025e60a4a798031c73327cef45cb.
This commit is contained in:
Przemysław Kryger 2024-10-25 15:26:03 +01:00
parent f31e93a73a
commit 2225af5bef
2 changed files with 2 additions and 2 deletions

View File

@ -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

View File

@ -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)