From 6431b94abaecd4cba7ec9de8257c2e8539c837bf Mon Sep 17 00:00:00 2001 From: Maikel Linke Date: Thu, 23 Nov 2023 16:30:02 +1100 Subject: [PATCH] Remove unnecessary condition in spec helper This helper file is only loaded when system specs are loaded. So we don't need to check for the absence of system specs because this file wouldn't be loaded if there were not system specs to be run. --- spec/system/support/precompile_assets.rb | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/spec/system/support/precompile_assets.rb b/spec/system/support/precompile_assets.rb index cb137f19e6..2d8958c147 100644 --- a/spec/system/support/precompile_assets.rb +++ b/spec/system/support/precompile_assets.rb @@ -1,23 +1,12 @@ # frozen_string_literal: true RSpec.configure do |config| - # Skip assets precompilcation if we exclude system specs. - # For example, you can run all non-system tests via the following command: - # - # rspec --tag ~type:system - # - # In this case, we don't need to precompile assets. - next if - config.filter.opposite.rules[:type] == "system" || - config.exclude_pattern.match?(%r{spec/system}) - config.before(:suite) do # We can use webpack-dev-server for tests, too! # Useful if you working on a frontend code fixes and want to verify them via system tests. next if Webpacker.dev_server.running? $stdout.puts "\n Precompiling assets.\n" - Webpacker.compile end end