Sha256: 506d939b67358bc7403c1f53ebf45bb5f8811b2bf18ed20f98f3e6cf64c31f25

Contents?: true

Size: 621 Bytes

Versions: 7

Compression:

Stored size: 621 Bytes

Contents

# encoding: UTF-8

# Copyright 2012 Twitter, Inc
# http://www.apache.org/licenses/LICENSE-2.0

require 'spec_helper'

describe TwitterCldr::Localized::LocalizedHash do
  describe "#to_yaml" do
    it "should be able to successfully roundtrip the hash" do
      hash = { foo: "bar", "string_key" => Object.new }
      result = TwitterCldr::Resources::Loader.load_yaml(hash.localize.to_yaml, permitted_classes: [Object, Symbol])

      expect(result).to include(:foo)
      expect(result).to include("string_key")
      expect(result[:foo]).to eq("bar")
      expect(result["string_key"]).to be_a(Object)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
twitter_cldr-6.12.0 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.5 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.4 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.3 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.2 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.1 spec/localized/localized_hash_spec.rb
twitter_cldr-6.11.0 spec/localized/localized_hash_spec.rb