discourse/spec/tasks/assets_precompile_spec.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
486 B
Ruby
Raw Normal View History

# frozen_string_literal: true
RSpec.describe "assets:precompile" do
before do
Rake::Task.clear
Discourse::Application.load_tasks
end
describe "assets:precompile:js_processor" do
it "compiles the js processor" do
out = capture_stdout { Rake::Task["assets:precompile:js_processor"].invoke }
expect(out).to match(%r{Compiled js-processor: tmp/js-processor})
path = out.match(/: (.+)/)[1]
expect(File.exist?(path)).to eq(true)
end
end
end