DEV: Stub stderr instead of manual change (#21511)

Fixes "stack too deep" issues in CI
This commit is contained in:
Jarek Radosz 2023-05-11 21:18:55 +02:00 committed by GitHub
parent e905de66ff
commit f9db5d5ea6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -878,20 +878,10 @@ RSpec.describe Stylesheet::Manager do
end
describe ".precompile css" do
before do
class << STDERR
alias_method :orig_write, :write
def write(x)
end
end
end
before { STDERR.stubs(:write) }
after do
class << STDERR
def write(x)
orig_write(x)
end
end
STDERR.unstub(:write)
FileUtils.rm_rf("tmp/stylesheet-cache")
end