Sha256: 30c6f71520c35a12b24b7683f9d095807cf19f203299ee1ddf6496e7276ca492
Contents?: true
Size: 681 Bytes
Versions: 5
Compression:
Stored size: 681 Bytes
Contents
module LoadTestConfig def self.stuff(conf_dir) $test_data = {} # lazily load all conf data without call to load_fixture path=File.expand_path(conf_dir) Dir.entries("#{conf_dir}/../conf").each { |i| next if File.directory?("#{path}/#{i}") || i.to_s == "." || i.to_s == ".." || i.to_s !~ /[\.yml$|\.yaml$]/i key=i.gsub(/\..*$/, '').to_sym puts "LOADING CONF: #{TEST_CASE_DIR}/../conf/#{i}}" begin $test_data[key] = YAML::load_file(File.expand_path("#{TEST_CASE_DIR}/../conf/#{i}")) rescue => e raise StandardError, "Couldn't load config #{TEST_CASE_DIR}/../conf/#{i}\n\n#{e}\n\n" end } end end
Version data entries
5 entries across 5 versions & 1 rubygems