Skip to content

Commit

Permalink
show test directories
Browse files Browse the repository at this point in the history
  • Loading branch information
retorquere committed May 10, 2021
1 parent f9ce567 commit a0f3130
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
10 changes: 5 additions & 5 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a0f3130

Please sign in to comment.