diff --git a/Makefile b/Makefile index 201d8df5891..4a5014a20af 100644 --- a/Makefile +++ b/Makefile @@ -100,11 +100,11 @@ public/packs/manifest.json: yarn.lock $(shell find app/javascript -type f) ## Bu yarn build test: export RAILS_ENV := test -test: $(CONFIG) public/packs/manifest.json ## Runs RSpec and yarn tests +test: $(CONFIG) ## Runs RSpec and yarn tests bundle exec rake parallel:spec && yarn test fast_test: export RAILS_ENV := test -fast_test: public/packs/manifest.json ## Abbreviated test run, runs RSpec tests without accessibility specs +fast_test: ## Abbreviated test run, runs RSpec tests without accessibility specs bundle exec rspec --exclude-pattern "**/features/accessibility/*_spec.rb" tmp/$(HOST)-$(PORT).key tmp/$(HOST)-$(PORT).crt: ## Self-signed cert for local HTTPS development diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index b53892f5698..df4ce41c97b 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -66,6 +66,13 @@ class Analytics end end + if !ENV['CI'] + config.before(:all, js: true) do + puts 'Bundling JavaScript...' + system 'make public/packs/manifest.json' + end + end + config.before(:each) do I18n.locale = :en end