Skip to content

Commit f39e1cc

Browse files
committed
Precompile assets in the host app before running specs
1 parent 9d20170 commit f39e1cc

File tree

1 file changed

+9
-5
lines changed

1 file changed

+9
-5
lines changed

tasks/blacklight.rake

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
require 'engine_cart/rake_task'
44

55
require 'rspec/core/rake_task'
6-
RSpec::Core::RakeTask.new(:spec) do |t|
6+
RSpec::Core::RakeTask.new(spec: 'blacklight:build_host_assets') do |t|
77
t.pattern = 'spec/**/*_spec.rb'
88
end
99

@@ -46,15 +46,19 @@ desc "Run test suite"
4646
task ci: ['build:npm'] do
4747
with_solr do
4848
Rake::Task['blacklight:internal:seed'].invoke
49-
within_test_app do
50-
# Precompiles the javascript
51-
system "bin/rake spec:prepare"
52-
end
5349
Rake::Task['blacklight:coverage'].invoke
5450
end
5551
end
5652

5753
namespace :blacklight do
54+
task :build_host_assets do
55+
within_test_app do
56+
# Precompiles the assets
57+
warn "Doing db:test:prepare"
58+
system "bin/rake db:test:prepare"
59+
end
60+
end
61+
5862
desc "Run tests with coverage"
5963
task :coverage do
6064
ENV['COVERAGE'] = 'true'

0 commit comments

Comments
 (0)