diff options
Diffstat (limited to 'spec/ruby/library/yaml/shared/each_document.rb')
-rw-r--r-- | spec/ruby/library/yaml/shared/each_document.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/ruby/library/yaml/shared/each_document.rb b/spec/ruby/library/yaml/shared/each_document.rb index 999123dc2a..6f00aee297 100644 --- a/spec/ruby/library/yaml/shared/each_document.rb +++ b/spec/ruby/library/yaml/shared/each_document.rb @@ -1,7 +1,7 @@ describe :yaml_each_document, shared: true do it "calls the block on each successive document" do documents = [] - YAML.send(@method, $multidocument) do |doc| + YAML.send(@method, YAMLSpecs::MULTIDOCUMENT) do |doc| documents << doc end documents.should == [["Mark McGwire", "Sammy Sosa", "Ken Griffey"], @@ -9,7 +9,8 @@ describe :yaml_each_document, shared: true do end it "works on files" do - File.open($test_parse_file, "r") do |file| + test_parse_file = fixture __FILE__, "test_yaml.yml" + File.open(test_parse_file, "r") do |file| YAML.send(@method, file) do |doc| doc.should == {"project"=>{"name"=>"RubySpec"}} end |