Sha256: 98f64e54576b52c58b747edbf1769ca968a76f7d00baae70a7e0e7cecca87808

Contents?: true

Size: 1.16 KB

Versions: 26

Compression:

Stored size: 1.16 KB

Contents

require 'spec_helper'

describe DevFlow::RoadMap do
  describe "#parse" do
    context "valid file" do
      subject (:roadmap) do
        DevFlow::RoadMap.new('examples/ROADMAP', {}).parse
      end

      it "should be a Roadmap object" do
        roadmap.is_a?(DevFlow::RoadMap).should be_true
      end

      it "should assign parents well" do
        roadmap.ln_tasks[28].parent.is_a?(DevFlow::Task)
        roadmap.ln_tasks[28].level.should eq(2)
        roadmap.ln_tasks[28].parent.branch_name.should eq("scope")
        roadmap.ln_tasks[28].parent.level.should eq(1)
      end

      it "should assign dependencies well" do
        roadmap.ln_tasks[70].dependencies.size.should eq(2)
        roadmap.ln_tasks[70].dependencies[0].branch_name.should eq("release_api_design_0.1")
        roadmap.ln_tasks[70].dependencies[1].branch_name.should eq("model_spec")
      end

      it "return a list of team members" do
        %w[huangw  xuyc liudx cuibg wangqh].each do |m|
          roadmap.team_member_names.include?(m).should be_true
        end
        roadmap.team_member_names.include?('sunyr').should be_false
      end
    end
  end
end

Version data entries

26 entries across 26 versions & 1 rubygems

Version Path
dev_flow-0.6.2 spec/roadmap_spec.rb
dev_flow-0.6.1 spec/roadmap_spec.rb
dev_flow-0.6.0 spec/roadmap_spec.rb
dev_flow-0.5.5 spec/roadmap_spec.rb
dev_flow-0.5.4 spec/roadmap_spec.rb
dev_flow-0.5.3 spec/roadmap_spec.rb
dev_flow-0.5.2 spec/roadmap_spec.rb
dev_flow-0.5.1 spec/roadmap_spec.rb
dev_flow-0.5.0 spec/roadmap_spec.rb
dev_flow-0.4.2 spec/roadmap_spec.rb
dev_flow-0.4.1 spec/roadmap_spec.rb
dev_flow-0.4.0 spec/roadmap_spec.rb
dev_flow-0.3.1 spec/roadmap_spec.rb
dev_flow-0.3.0 spec/roadmap_spec.rb
dev_flow-0.2.4 spec/roadmap_spec.rb
dev_flow-0.2.3 spec/roadmap_spec.rb
dev_flow-0.2.2 spec/roadmap_spec.rb
dev_flow-0.2.1 spec/roadmap_spec.rb
dev_flow-0.2.0 spec/roadmap_spec.rb
dev_flow-0.1.6 spec/roadmap_spec.rb