diff --git a/tasks/blacklight.rake b/tasks/blacklight.rake index 60ea9f133..14b8f0a71 100644 --- a/tasks/blacklight.rake +++ b/tasks/blacklight.rake @@ -3,7 +3,7 @@ require 'engine_cart/rake_task' require 'rspec/core/rake_task' -RSpec::Core::RakeTask.new(:spec) do |t| +RSpec::Core::RakeTask.new(spec: 'blacklight:build_host_assets') do |t| t.pattern = 'spec/**/*_spec.rb' end @@ -46,15 +46,21 @@ desc "Run test suite" task ci: ['build:npm'] do with_solr do Rake::Task['blacklight:internal:seed'].invoke - within_test_app do - # Precompiles the javascript - system "bin/rake spec:prepare" - end Rake::Task['blacklight:coverage'].invoke end end namespace :blacklight do + task :build_host_assets do + within_test_app do + # Precompiles the assets + warn "Doing spec:prepare" + `bin/rails spec:prepare` + end + warn "Seeing if we have the blacklight styles" + puts `grep "This file is generated by Blacklight" .internal_test_app/app/assets/builds/application.css` + end + desc "Run tests with coverage" task :coverage do ENV['COVERAGE'] = 'true'