Sha256: c5ca6e84f6960b8870682f98db78066e72ef72e2f408839b472dcbd51d41f4c8

Contents?: true

Size: 1.06 KB

Versions: 31

Compression:

Stored size: 1.06 KB

Contents

require 'spec_helper'

shared_examples_for Pacer::Core::Graph::ElementRoute do
  describe '#properties' do
    subject { r.properties }
    its(:count) { should == r.count }
    its(:element_type) { should == :hash }
    specify 'should all be hashes' do
      props = subject.each
      elements = r.each
      elements.zip(props.to_a).each do |e, p|
        e.properties.should == p
      end
    end
  end

  context 'with extensions' do
    let(:route) { r.add_extensions([Tackle::SimpleMixin]) }
    describe '#each without a block' do
      subject { route.each }
      specify 'elements should be wrapped' do
        subject.first.extensions.should include(Tackle::SimpleMixin)
      end
    end
  end
end

Run.all(:read_only) do
  use_pacer_graphml_data(:read_only)

  context Pacer::Core::Graph::EdgesRoute, '2' do
    it_uses Pacer::Core::Graph::ElementRoute do
      def r
        graph.e
      end
    end
  end

  context Pacer::Core::Graph::VerticesRoute, '2' do
    it_uses Pacer::Core::Graph::ElementRoute do
      def r
        graph.v
      end
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
pacer-2.0.24-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.22-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.20-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.19-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.18-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.17-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.16-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.15-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.14-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.13-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.12-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.10-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.10.pre-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.8-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.6-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.4.pre-java spec/pacer/core/graph/element_route_spec.rb
pacer-2.0.0.pre-java spec/pacer/core/graph/element_route_spec.rb
pacer-1.6.0-java spec/pacer/core/graph/element_route_spec.rb
pacer-1.5.4-java spec/pacer/core/graph/element_route_spec.rb
pacer-1.5.3-java spec/pacer/core/graph/element_route_spec.rb