summaryrefslogtreecommitdiff
path: root/spec/ruby/library/yaml/load_file_spec.rb
blob: 2363c081208628e80c1759b36c6f846ec68493cb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
require_relative '../../spec_helper'
require_relative 'fixtures/common'

describe "YAML.load_file" do
  after :each do
    rm_r $test_file
  end

  it "returns a hash" do
    File.open($test_file,'w' ){|io| YAML.dump( {"bar"=>2, "car"=>1}, io ) }
    YAML.load_file($test_file).should == {"bar"=>2, "car"=>1}
  end
end