Sha256: 1774d504f8ec71fd0c56f30913acc369e20d9c5441c17019826c24d74f137737

Contents?: true

Size: 1.02 KB

Versions: 1

Compression:

Stored size: 1.02 KB

Contents

require 'spec_helper'

Run.tg(:read_only) do
  use_pacer_graphml_data :read_only

  describe Pacer::Filter::EmptyFilter do
    let(:origin) { graph.v(Tackle::SimpleMixin) }
    let(:empty) { Pacer::Route.empty(origin) }
    subject { empty }

    its(:graph) { should == graph }
    its(:element_type) { should == graph.element_type(:vertex) }
    its(:extensions) { should == Set[Tackle::SimpleMixin] }
    its(:build_pipeline) { should be_nil }

    context 'with route built on it' do
      subject { empty.filter(name: 'joe') }
      its(:graph) { should == graph }
      its(:element_type) { should == graph.element_type(:vertex) }
      its(:extensions) { should == Set[Tackle::SimpleMixin] }
      its(:inspect) { should == '#<V -> V-Property(name=="joe")>' }
      it 'should create a pipeline with only the pipe added to it' do
        start_pipe, end_pipe = subject.send :build_pipeline
        start_pipe.should == end_pipe
        start_pipe.should be_a Java::ComTinkerpopPipesFilter::PropertyFilterPipe
      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/empty_filter_spec.rb