diff --git a/lib/tasks/assets.rake b/lib/tasks/assets.rake index 881ddf9efc8..f5e891241d0 100644 --- a/lib/tasks/assets.rake +++ b/lib/tasks/assets.rake @@ -310,8 +310,7 @@ task "assets:precompile:compress_js": "environment" do end task "assets:precompile:theme_transpiler": "environment" do - path = DiscourseJsProcessor::Transpiler.build_theme_transpiler - puts "Compiled theme-transpiler: #{path}" + DiscourseJsProcessor::Transpiler.build_theme_transpiler end # Run these tasks **before** Rails' "assets:precompile" task diff --git a/spec/tasks/assets_precompile_spec.rb b/spec/tasks/assets_precompile_spec.rb index 51a8f1ab4d8..d12d3ee0808 100644 --- a/spec/tasks/assets_precompile_spec.rb +++ b/spec/tasks/assets_precompile_spec.rb @@ -8,10 +8,9 @@ RSpec.describe "assets:precompile" do describe "assets:precompile:theme_transpiler" do it "compiles the js processor" do - out = capture_stdout { Rake::Task["assets:precompile:theme_transpiler"].invoke } + path = Rake::Task["assets:precompile:theme_transpiler"].actions.first.call - expect(out).to match(%r{Compiled theme-transpiler: tmp/theme-transpiler}) - path = out.match(/: (.+)/)[1] + expect(path).to match(%r{tmp/theme-transpiler}) expect(File.exist?(path)).to eq(true) end end