PERF: apply sprockets patch in a test environment (#11034)
When plugin spec is evaluated for the first time, it took 30 seconds to run: ``` rm -rf tmp/* && LOAD_PLUGINS=1 be rspec ./plugins/discourse-solved/spec/requests/topics_controller_spec.rb ``` Applying sprocket patch in test environment solves that issue
This commit is contained in:
parent
a5ff9fbe51
commit
61f6f53dab
|
@ -8,7 +8,7 @@
|
|||
# 2. Stop using a concatenator that does tons of work checking for semicolons when
|
||||
# when rebuilding an asset
|
||||
|
||||
if Rails.env == "development"
|
||||
if Rails.env.development? || Rails.env.test?
|
||||
module ActionView::Helpers::AssetUrlHelper
|
||||
|
||||
def asset_path(source, options = {})
|
||||
|
|
Loading…
Reference in New Issue