Sha256: a8e5cf8550a034c92f99db81a613d76dec18fa1bbb85e0da2eeff339bc523924
Contents?: true
Size: 1 KB
Versions: 19
Compression:
Stored size: 1 KB
Contents
require 'spec_helper' describe Arachni::Support::LookUp::Moolb do it_behaves_like 'lookup' describe '#initialize' do describe :strategy do it 'sets the strategy for the internal cache' do options = { strategy: Arachni::Support::Cache::LeastRecentlyUsed, max_size: 3 } lu = described_class.new( options ) 4.times do |i| lu << i end lu.include?( 0 ).should be_false 1.upto( 3 ) do |i| lu.include?( i ).should be_true end end end describe :max_size do it 'sets the maximum size of the cache' do options = { max_size: 3 } lu = described_class.new( options ) 40.times do |i| lu << i end lu.size.should == 3 end end end end
Version data entries
19 entries across 19 versions & 1 rubygems