From a0f313013a723e0a580a300219e077f20db43090 Mon Sep 17 00:00:00 2001 From: Emiliano Heyns Date: Mon, 10 May 2021 16:28:41 +0200 Subject: [PATCH] show test directories --- Rakefile | 2 ++ spec/spec_helper.rb | 10 +++++----- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index 1f29f3380dfe..9ec2cff9847d 100644 --- a/Rakefile +++ b/Rakefile @@ -7,6 +7,8 @@ rescue Bundler::BundlerError => e exit e.status_code end +puts "Running tests from #{Dir.pwd}" + require 'rspec/core' require 'rspec/core/rake_task' RSpec::Core::RakeTask.new(:spec) do |spec| diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f1aa2c93b3f6..57449392bd48 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -92,20 +92,20 @@ def load_style(path) end def collect_styles(type = '') - Dir[File.join(STYLE_ROOT, type, '*.csl')].select do |filename| + dependence = type == '' ? 'independent' : type + glob = File.join(STYLE_ROOT, type, '*.csl') + print "\nLoading #{dependence} styles matching #{STYLE_FILTER.source} in #{glob}" + + Dir[glob].select do |filename| filename =~ STYLE_FILTER end end -print "\nLoading dependent styles" - Dependents = Hash[collect_styles('dependent').each_with_index.map { |path, i| print '.' if i % 120 == 0 load_style(path) }] -print "\nLoading independent styles" - Independents = Hash[collect_styles.each_with_index.map { |path, i| print '.' if i % 120 == 0 load_style(path)