Sha256: 93a8cdd8b2b122c1fa75d2d3f3098726cede078a462b600c0e23f77da278c26c

Contents?: true

Size: 522 Bytes

Versions: 4

Compression:

Stored size: 522 Bytes

Contents

module Project
  describe Lookup do
    
    before do
      @data = { :age => 20 }
    end
    
    it "should use a hash as a lookup object" do
      Lookup.store.class.should == Hash
    end
    
    it "should set a lookup key correctly" do
      
      Lookup.set(:bob, @data)
      Lookup.store[:bob].should == @data
    end
    
    it "raise an abstract class error on trying to get a key" do
      Lookup.set(:bob, @data)
      lambda { Lookup.get(:bob) }.should raise_error(AbstractClassError)
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
project-0.9.3 spec/lib/lookup_spec.rb
project-0.9.2 spec/lib/lookup_spec.rb
project-0.9.0 spec/lib/lookup_spec.rb
project-0.8.0 spec/lib/lookup_spec.rb