Sha256: 604f1ff2135076dff5658e271bfd269e2744532c297d5085cd037ea27445bded

Contents?: true

Size: 351 Bytes

Versions: 1

Compression:

Stored size: 351 Bytes

Contents

require 'spec_helper'


describe Rufus::Lru::SynchronizedHash do

  # well, you've probably seen better specs...

  let(:hash) { Rufus::Lru::SynchronizedHash.new(3) }

  it 'sports a mutex' do

    hash.instance_variable_get(:@mutex).class.should == Mutex
  end

  it 'works' do

    4.times { |i| hash[i] = i }

    hash.size.should == 3
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
rufus-lru-1.0.5 spec/synchronized_hash_spec.rb