Sha256: e2f04eb9f57d2e81dcb3862688c4e2146f47ea8fc955ccab377e4311704177e4

Contents?: true

Size: 755 Bytes

Versions: 5

Compression:

Stored size: 755 Bytes

Contents

# -*- coding: utf-8 -*-
require 'spec_helper'

describe Tengine::Job::Vertex do
  describe :ancestors do
    context "templateの場合" do
      before do
        builder = Rjn0009TreeSequentialJobnetBuilder.new
        builder.create_template
        @ctx = builder.context
      end

      context "ルートを先頭に親までの配列を返します" do
        it "深さ3のジョブ・ジョブネットなら2つの要素を返します" do
          @ctx[:j1120].ancestors.should == [@ctx[:root], @ctx[:j1100]]
        end

        it "深さ4のジョブ・ジョブネットなら3つの要素を返します" do
          @ctx[:j1611].ancestors.should == [@ctx[:root], @ctx[:j1600], @ctx[:j1610]]
        end
      end
    end
  end

end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
tengine_job-0.6.13 spec/tengine/job/vertex_spec.rb
tengine_job-0.6.12 spec/tengine/job/vertex_spec.rb
tengine_job-0.6.11 spec/tengine/job/vertex_spec.rb
tengine_job-0.6.10 spec/tengine/job/vertex_spec.rb
tengine_job-0.6.9 spec/tengine/job/vertex_spec.rb