Sha256: c5356a736b2b3d7f8c0283d9f5da3ba4d415253feac7b1f490250e0c30a5c206

Contents?: true

Size: 585 Bytes

Versions: 17

Compression:

Stored size: 585 Bytes

Contents

# encoding: UTF-8

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

require 'spec_helper'

include TwitterCldr::Tokenizers

describe Token do
  describe "#initialize" do
    it "should set instance variables passed in the options hash" do
      token = Token.new(:type => "my_type", :value => "my_value")
      expect(token.type).to eq("my_type")
      expect(token.value).to eq("my_value")
    end
  end

  describe "#to_s" do
    it "should return the token's value" do
      expect(Token.new(:value => "my_value").to_s).to eq("my_value")
    end
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
solidus_backend-1.0.0.pre3 vendor/bundle/gems/twitter_cldr-3.2.1/spec/tokenizers/token_spec.rb
solidus_backend-1.0.0.pre2 vendor/bundle/gems/twitter_cldr-3.2.1/spec/tokenizers/token_spec.rb
solidus_backend-1.0.0.pre vendor/bundle/gems/twitter_cldr-3.1.2/spec/tokenizers/token_spec.rb
twitter_cldr-3.2.1 spec/tokenizers/token_spec.rb
twitter_cldr-3.2.0 spec/tokenizers/token_spec.rb
twitter_cldr-3.1.2 spec/tokenizers/token_spec.rb
twitter_cldr-3.1.1 spec/tokenizers/token_spec.rb
twitter_cldr-3.1.0 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.10 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.9 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.8 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.7 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.6 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.5 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.4 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.3 spec/tokenizers/token_spec.rb
twitter_cldr-3.0.2 spec/tokenizers/token_spec.rb