Sha256: c3e6dacee9e60b534196834e334b450cab51ea498d13308bffc8dd229910688c

Contents?: true

Size: 911 Bytes

Versions: 27

Compression:

Stored size: 911 Bytes

Contents

# encoding: UTF-8

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

require 'spec_helper'

describe 'trie dumps', slow: true do
  let(:default_trie) { TwitterCldr::Collation::TrieBuilder.load_default_trie }
  let(:error_message) { 'expected trie dump to be up-to-date.' }

  it 'has a valid default Fractional Collation Elements trie dump' do
    expect(TwitterCldr::Collation::TrieLoader.load_default_trie.to_hash).to(eq(default_trie.to_hash), error_message)
  end

  TwitterCldr.supported_locales.each do |locale|
    it "has a valid tailored trie dump for #{locale} locale" do
      loaded_trie = TwitterCldr::Collation::TrieLoader.load_tailored_trie(locale, TwitterCldr::Utils::Trie.new)
      fresh_trie  = TwitterCldr::Collation::TrieBuilder.load_tailored_trie(locale, default_trie)

      expect(loaded_trie.to_hash).to(eq(fresh_trie.to_hash), error_message)
    end
  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
twitter_cldr-6.12.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.5 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.4 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.3 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.2 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.1 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.11.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.10.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.9.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.8.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.7.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.6.2 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.6.1 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.6.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.5.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.4.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.3.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.2.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.1.0 spec/collation/trie_dumps_spec.rb
twitter_cldr-6.0.2 spec/collation/trie_dumps_spec.rb