diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index df4ce41c97b..e0dd6b8e438 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -67,9 +67,14 @@ class Analytics end if !ENV['CI'] - config.before(:all, js: true) do - puts 'Bundling JavaScript...' - system 'make public/packs/manifest.json' + config.before(js: true) do + # rubocop:disable Style/GlobalVars + next if defined?($ran_asset_build) + $ran_asset_build = true + # rubocop:enable Style/GlobalVars + puts 'Bundling JavaScript and stylesheets...' + system 'WEBPACK_PORT= yarn build' + system 'yarn build:css' end end