mirror of
https://github.com/discourse/discourse.git
synced 2025-02-21 20:44:10 +08:00
FIX: Precompile errors for wizard tests
This commit is contained in:
parent
6a8f5d497e
commit
ad04d188ae
@ -209,6 +209,17 @@ module Discourse
|
|||||||
if plugins = Discourse.plugins
|
if plugins = Discourse.plugins
|
||||||
plugins.each{|plugin| plugin.notify_after_initialize}
|
plugins.each{|plugin| plugin.notify_after_initialize}
|
||||||
end
|
end
|
||||||
|
|
||||||
|
# This nasty hack is required for not precompiling QUnit assets
|
||||||
|
# in test mode. see: https://github.com/rails/sprockets-rails/issues/299#issuecomment-167701012
|
||||||
|
ActiveSupport.on_load(:action_view) do
|
||||||
|
default_checker = ActionView::Base.precompiled_asset_checker
|
||||||
|
|
||||||
|
ActionView::Base.precompiled_asset_checker = -> logical_path do
|
||||||
|
default_checker[logical_path] ||
|
||||||
|
%w{qunit.js qunit.css test_helper.css test_helper.js wizard/test/test_helper.js}.include?(logical_path)
|
||||||
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if ENV['RBTRACE'] == "1"
|
if ENV['RBTRACE'] == "1"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user