Moving to fixtures

This commit is contained in:
Arfon Smith
2014-09-17 08:37:00 -05:00
parent 302af86363
commit e70cd33323
3 changed files with 14 additions and 14 deletions

View File

@@ -447,14 +447,14 @@ class TestBlob < Test::Unit::TestCase
end end
# Test language detection for files which shouldn't be used as samples # Test language detection for files which shouldn't be used as samples
root = File.expand_path('../../test-files', __FILE__) root = File.expand_path('../fixtures', __FILE__)
Dir.entries(root).each do |language| Dir.entries(root).each do |language|
next if language == '.' || language == '..' next unless File.file?(language)
# Each directory contains test files of a language # Each directory contains test files of a language
dirname = File.join(root, language) dirname = File.join(root, language)
Dir.entries(dirname).each do |filename| Dir.entries(dirname).each do |filename|
next if filename == '.' || filename == '..' next unless File.file?(filename)
# By default blob search the file in the samples; # By default blob search the file in the samples;
# thus, we need to give it the absolute path # thus, we need to give it the absolute path