1 require File.dirname(__FILE__) + '/../../spec_helper'
3 describe "LookupTable#delete" do
5 @lt = LookupTable.new(:a => 1, :b => 2, :c => 3)
8 it "removes and returns the entry if it exists" do
10 @lt.delete(:c).should == 3
15 it "returns nil if the entry does not exist" do
16 @lt.delete(:d).should == nil
20 it "converts a String key argument to a Symbol" do
21 @lt.delete("c").should == 3