Sha256: b92732d74a5a54f7deae8452d517e23cfcf2a9d01a23f6da9c109e2209da049c
Contents?: true
Size: 1023 Bytes
Versions: 1
Compression:
Stored size: 1023 Bytes
Contents
require 'spec_helper' Run.tg(:read_only) do use_pacer_graphml_data(:read_only) describe Pacer::Filter::LoopFilter do describe '#repeat' do it 'should apply the route part twice' do route = graph.v.repeat(2) { |tail| tail.out_e.in_v }.inspect route.should == graph.v.out_e.in_v.out_e.in_v.inspect end it 'should apply the route part 3 times' do route = graph.v.repeat(3) { |tail| tail.out_e.in_v }.inspect route.should == graph.v.out_e.in_v.out_e.in_v.out_e.in_v.inspect end describe 'with a range' do let(:start) { graph.vertex(0).v } subject { start.repeat(1..3) { |tail| tail.out_e.in_v[0] } } it 'should be equivalent to executing each path separately' do pending subject.to_a.should == [start.out_e.in_v.first, start.out_e.in_v.out_e.in_v.first, start.out_e.in_v.out_e.in_v.out_e.in_v.first] end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pacer-0.9.1.1-java | spec/pacer/filter/loop_filter_spec.rb |