Sha256: fb3b695b4085fd6bb3ece5b70647795fe2f295a58883e85ed104a651af04b6ad

Contents?: true

Size: 645 Bytes

Versions: 19

Compression:

Stored size: 645 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(:locale => :es)
      got       = tokenizer.tokens(:unit => :minute, :direction => :ago, :number => 7659, :type => :default)

      got[0].should == { :value => "Hace ", :type => :plaintext }
      got[1].should == { :value => "{0}", :type => :placeholder }
      got[2].should == { :value => " minutos", :type => :plaintext }
    end
  end

end

Version data entries

19 entries across 19 versions & 1 rubygems

Version Path
twitter_cldr-2.4.3 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-3.0.0.beta1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.4.2 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.4.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.4.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.2.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.1.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.1.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.0.2 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.0.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-2.0.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.9.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.9.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.8.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.8.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.7.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.6.2 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.6.1 spec/tokenizers/calendars/timespan_tokenizer_spec.rb
twitter_cldr-1.6.0 spec/tokenizers/calendars/timespan_tokenizer_spec.rb