test/preprocess_collection_test.rb in macroape-3.3.1 vs test/preprocess_collection_test.rb in macroape-3.3.2
- old
+ new
@@ -3,9 +3,11 @@
require 'macroape'
class TestPreprocessCollection < Test::Unit::TestCase
def test_multipvalue_preproceessing
system(Helpers.exec_cmd('preprocess_collection','test/data/test_collection -o test/data/test_collection.yaml.tmp -p 0.0005 0.0001 0.00005 --silent'))
- assert_equal YAML.load_file('test/data/test_collection.yaml'), YAML.load_file('test/data/test_collection.yaml.tmp')
+ # Don't use YAML.load_file() instead of YAML.load(File.read()) because in ruby before v1.93 p194
+ # it doesn't immediately release file descriptor (if I understood error right way) so File.delete fails
+ assert_equal YAML.load(File.read('test/data/test_collection.yaml')), YAML.load(File.read('test/data/test_collection.yaml.tmp'))
File.delete 'test/data/test_collection.yaml.tmp'
end
end