Sha256: 64ab7000991d2bbb6d31dd93a30e6c1c82375169e65d9713d51369fd70765ce4

Contents?: true

Size: 561 Bytes

Versions: 28

Compression:

Stored size: 561 Bytes

Contents

require 'helper'

class TestToken < TestCase

  def setup
    # Wed Aug 16 14:00:00 UTC 2006
    @now = Time.local(2006, 8, 16, 14, 0, 0, 0)
  end

  def test_token
    token = Chronic::Token.new('foo')
    assert_equal 0, token.tags.size
    assert !token.tagged?
    token.tag("mytag")
    assert_equal 1, token.tags.size
    assert token.tagged?
    assert_equal String, token.get_tag(String).class
    token.tag(5)
    assert_equal 2, token.tags.size
    token.untag(String)
    assert_equal 1, token.tags.size
    assert_equal 'foo', token.word
  end

end

Version data entries

28 entries across 28 versions & 7 rubygems

Version Path
gitlab-chronic-0.10.6 test/test_token.rb
gitlab-chronic-0.10.5 test/test_token.rb
asana2flowdock-1.0.0 vendor/bundle/ruby/1.9.1/gems/chronic-0.10.2/test/test_token.rb
chronic-mmlac-0.10.2.1 test/test_token.rb
chronic-0.10.2 test/test_token.rb
chronic-0.10.1 test/test_token.rb
chronic-0.10.0 test/test_token.rb
chronic-0.9.1 test/test_token.rb
chronic-0.9.0 test/test_token.rb
Hokkaido-0.1.5 chronic/test/test_token.rb
Hokkaido-0.1.4 chronic/test/test_token.rb
Hokkaido-0.1.3 chronic/test/test_token.rb
Hokkaido-0.1.2 chronic/test/test_token.rb
Hokkaido-0.1.1 chronic/test/test_token.rb
Hokkaido-0.1.0 chronic/test/test_token.rb
Hokkaido-0.0.9 chronic/test/test_token.rb
Hokkaido-0.0.6 chronic/test/test_token.rb
Hokkaido-0.0.5 chronic/test/test_token.rb
Hokkaido-0.0.4 chronic/test/test_token.rb
chronic-0.8.0 test/test_token.rb