Sha256: 0fb76fbab3dc99b19fb65801917b2b7e6d55495c689671909deba6e64ceb6bdb

Contents?: true

Size: 1.04 KB

Versions: 1

Compression:

Stored size: 1.04 KB

Contents

require 'spec_helper'

Run.all :read_only do
  use_pacer_graphml_data :read_only

  describe Pacer::Wrappers::VertexWrapper do

    let(:v_exts) { [Tackle::SimpleMixin, TP::Project] }
    let(:v_wrapper_class) { Pacer::Wrappers::VertexWrapper.wrapper_for v_exts }

    subject { v_wrapper_class }

    it { should_not be_nil }
    its(:route_conditions) { should == { type: 'project' } }
    its(:extensions) { should == v_exts }

    describe 'instance' do
      subject { v_wrapper_class.new pacer }
      it               { should_not be_nil }
      its(:element)    { should_not be_nil }
      it               { should == pacer }
      it               { should_not equal pacer }
      its(:element_id) { should == pacer.element_id }
      its(:extensions) { should == v_exts }

      describe 'with more extensions added' do
        subject { v_wrapper_class.new(pacer).add_extensions([Pacer::Utils::TSort]) }
        its(:class) { should_not == v_wrapper_class }
        its(:extensions) { should == v_exts + [Pacer::Utils::TSort] }
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
pacer-0.9.1.1-java spec/pacer/wrapper/vertex_wrapper_spec.rb