Permalink
Browse files

Replace deprecated YAML.load_documents

The .load_documents method is deprecated and seems to have been removed
entirely in the upcoming Ruby 2.5.
  • Loading branch information...
mvz committed Aug 29, 2017
1 parent 9ba2180 commit 00b55ace17ed408b1b6129e1ba6c90fd4f0a6d2c
Showing with 2 additions and 2 deletions.
  1. +2 −2 spec/spec_helper.rb
@@ -26,11 +26,11 @@ def fixtures
Dir[File.join(File.dirname(__FILE__), *%w[fixtures *.yml])].each do |testfile|
testgroup = File.basename(testfile, '.yml')
num = 0
YAML::load_documents(File.open(testfile)) do |doc|
YAML::load_stream(File.open(testfile)) do |doc|
name = doc['name'] || num
@fixtures["#{testgroup} #{name}"] = doc
num += 1
end
end
@fixtures
end
end

0 comments on commit 00b55ac

Please sign in to comment.