Sha256: e0890e78a33afc8ef06ef5a4f54d18f4b08b3c14913c9690e04294a0e95b9312
Contents?: true
Size: 805 Bytes
Versions: 34
Compression:
Stored size: 805 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' include TwitterCldr::Tokenizers describe TimespanTokenizer do describe "#tokens" do it "should return the correct list of tokens" do tokenizer = TimespanTokenizer.new(nil) tokenizer.tokenize("Hace {0} minutos").tap do |tokens| tokens[0].tap do |token| expect(token.value).to eq("Hace ") expect(token.type).to eq(:plaintext) end tokens[1].tap do |token| expect(token.value).to eq("{0}") expect(token.type).to eq(:pattern) end tokens[2].tap do |token| expect(token.value).to eq(" minutos") expect(token.type).to eq(:plaintext) end end end end end
Version data entries
34 entries across 34 versions & 3 rubygems