DEV: Fix constant redefinition warnings when running specs (#29837)

Don't load rake files over and over again when running specs.
This commit is contained in:
Alan Guo Xiang Tan
2024-11-20 12:17:36 +08:00
committed by GitHub
parent abfd065ff0
commit 6e1aeb1f50
15 changed files with 35 additions and 72 deletions

View File

@ -1,11 +1,6 @@
# frozen_string_literal: true
RSpec.describe "assets:precompile" do
before do
Rake::Task.clear
Discourse::Application.load_tasks
end
describe "assets:precompile:theme_transpiler" do
it "compiles the js processor" do
path = Rake::Task["assets:precompile:theme_transpiler"].actions.first.call