Sha256: f82d6b5caf12f7d61327f15c8a83d3f0c09bca6d4954d9fab06009a884f43cac

Contents?: true

Size: 447 Bytes

Versions: 17

Compression:

Stored size: 447 Bytes

Contents

require 'dentaku/token'

describe Dentaku::Token do
  it 'has a category and a value' do
    token = Dentaku::Token.new(:numeric, 5)
    expect(token.category).to eq(:numeric)
    expect(token.value).to eq(5)
    expect(token.is?(:numeric)).to be_truthy
  end

  it 'compares category and value to determine equality' do
    t1 = Dentaku::Token.new(:numeric, 5)
    t2 = Dentaku::Token.new(:numeric, 5)
    expect(t1 == t2).to be_truthy
  end
end

Version data entries

17 entries across 17 versions & 2 rubygems

Version Path
dentaku-3.5.4 spec/token_spec.rb
dentaku-3.5.3 spec/token_spec.rb
dentaku-3.5.2 spec/token_spec.rb
dentaku_zevo-3.5.2 spec/token_spec.rb
dentaku-3.5.1 spec/token_spec.rb
dentaku-3.5.0 spec/token_spec.rb
dentaku-3.4.2 spec/token_spec.rb
dentaku-3.4.1 spec/token_spec.rb
dentaku-3.4.0 spec/token_spec.rb
dentaku-3.3.4 spec/token_spec.rb
dentaku-3.3.3 spec/token_spec.rb
dentaku-3.3.2 spec/token_spec.rb
dentaku-3.3.1 spec/token_spec.rb
dentaku-3.3.0 spec/token_spec.rb
dentaku-3.2.1 spec/token_spec.rb
dentaku-3.2.0 spec/token_spec.rb
dentaku-3.1.0 spec/token_spec.rb