Sha256: 9ec0e44b96c41959aca15d5c01bec8bc004464b94a7264fb635242e2403c0660
Contents?: true
Size: 525 Bytes
Versions: 1
Compression:
Stored size: 525 Bytes
Contents
require 'spec_helper' require 'active_support/version' describe ActiveSupport::OrderedHash do context "#to_yaml" do subject do o = ActiveSupport::OrderedHash.new o[:one] = 1 o[:two] = 2 o end it "converts to yaml" do if ActiveSupport::VERSION::MAJOR >= 3 || RUBY_VERSION > "1.8" yml = "--- !omap \n- :one: 1\n- :two: 2\n" else yml = "--- !map:ActiveSupport::OrderedHash \n:one: 1\n:two: 2\n" end subject.to_yaml.should == yml end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
sc-core-ext-1.2.1 | spec/sc-core-ext/active_support/ordered_hash_spec.rb |