Sha256: 8834a26287aed398133ef763bfd3866c35cefba085d59eaa255a86d5ccd7d0ad
Contents?: true
Size: 619 Bytes
Versions: 17
Compression:
Stored size: 619 Bytes
Contents
# encoding: UTF-8 # Copyright 2012 Twitter, Inc # http://www.apache.org/licenses/LICENSE-2.0 require 'spec_helper' include TwitterCldr::Parsers describe SymbolTable do let(:table) { SymbolTable.new(a: "b", c: "d") } describe "#fetch" do it "should be able to retrieve values for symbols" do expect(table.fetch(:a)).to eq("b") fetch = lambda { table.fetch(:z) } expect(fetch).to raise_error(KeyError) end end describe "#add" do it "should be able to add then fetch new values for symbols" do table.add(:e, "f") expect(table.fetch(:e)).to eq("f") end end end
Version data entries
17 entries across 17 versions & 2 rubygems