spec/spec_helper.rb in rflow-0.0.5 vs spec/spec_helper.rb in rflow-1.0.0a1

- old
+ new

@@ -4,19 +4,21 @@ require 'log4r' RSpec.configure do |config| config.before(:all) do RFlow.logger = Log4r::Logger.new 'test' - RFlow.logger.add Log4r::StdoutOutputter.new('test_stdout', :formatter => RFlow::LOG_PATTERN_FORMATTER) + RFlow.logger.add Log4r::StdoutOutputter.new('test_stdout', :formatter => RFlow::Logger::LOG_PATTERN_FORMATTER) + @base_temp_directory_path = File.join(File.dirname(__FILE__), 'tmp') end config.before(:each) do - @temp_directory_path = File.expand_path(File.join(File.dirname(__FILE__), 'tmp')) - Dir.mkdir @temp_directory_path + @entropy = Time.now.to_f.to_s + @temp_directory_path = File.expand_path(File.join(@base_temp_directory_path, @entropy)) + FileUtils.mkdir_p @temp_directory_path end config.after(:each) do - FileUtils.rm_rf @temp_directory_path + FileUtils.rm_rf @base_temp_directory_path end end def decode_avro(schema_string, serialized_object)