mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-31 21:37:16 +00:00
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.
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user