Sha256: a90455f69f89e2d19bc7cc0e5792b5a2b663ee33cb362ba0bc3b7645c00f27d8
Contents?: true
Size: 540 Bytes
Versions: 7
Compression:
Stored size: 540 Bytes
Contents
describe :yaml_each_document, :shared => true do it "calls the block on each succesive document" do documents = [] YAML.send(@method, $multidocument) do |doc| documents << doc end documents.should == [["Mark McGwire", "Sammy Sosa", "Ken Griffey"], ["Chicago Cubs", "St Louis Cardinals"]] end it "works on files" do File.open($test_parse_file, "r") do |file| YAML.send(@method, file) do |doc| doc.should == {"project"=>{"name"=>"RubySpec"}} end end end end
Version data entries
7 entries across 7 versions & 1 rubygems