Sha256: 32d3b7d4f49eaf0af24ce3015ee450ddfce737189fb18511b062490c53d4ac3c
Contents?: true
Size: 536 Bytes
Versions: 38
Compression:
Stored size: 536 Bytes
Contents
require 'spec_helper' Run.tg(:read_only) do use_pacer_graphml_data(:read_only) describe 'RandomFilter' do describe '#random' do it { Set[*graph.v.random(1)].should == Set[*graph.v] } it { graph.v.random(0).to_a.should == [] } it 'should usually have some number of elements more than 1 and less than all' do range = 1..(graph.v.count - 1) best2of3 = (0...3).map { graph.v.random(0.5).count } best2of3.select { |num| range.include? num }.length.should >= 2 end end end end
Version data entries
38 entries across 38 versions & 1 rubygems