Sha256: 41553125ca46ef361001492b2120c1c9063d963426c68dc7e863322790076c8f

Contents?: true

Size: 1.55 KB

Versions: 6

Compression:

Stored size: 1.55 KB

Contents

require 'pione/test-helper'

TestHelper.scope do |this|
  this::PNML1 = Location[File.dirname(__FILE__)] + "data" + "pione-compiler" + "Sequence.pnml"

  describe Pione::Command::PioneCompile do
    before do
      @cmd = Pione::Command::PioneCompile
    end

    it "should compile from PNML to PIONE document" do
      Rootage::ScenarioTest.succeed(@cmd.new([this::PNML1.path.to_s]))
    end

    it "should compile with package name" do
      res = Rootage::ScenarioTest.succeed(@cmd.new([this::PNML1.path.to_s, "--package-name", "Sequence"]))
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.not.include "@ Editor ::"
      res.stdout.string.should.not.include "@ Tag ::"
    end

    it "should compile with package name and editor" do
      cmd = @cmd.new([this::PNML1.path.to_s, "--package-name", "Sequence", "--editor", "yamaguchi"])
      res = Rootage::ScenarioTest.succeed(cmd)
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.include "@ Editor :: \"yamaguchi\""
      res.stdout.string.should.not.include "@ Tag ::"
    end

    it "should compile with package name, editor, and tag" do
      cmd = @cmd.new([this::PNML1.path.to_s, "--package-name", "Sequence", "--editor", "yamaguchi", "--tag", "test"])
      res = Rootage::ScenarioTest.succeed(cmd)
      res.stdout.string.should.include "@ PackageName :: \"Sequence\""
      res.stdout.string.should.include "@ Editor :: \"yamaguchi\""
      res.stdout.string.should.include "@ Tag :: \"test\""
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
pione-0.5.0 test/command/spec_pione-compile.rb
pione-0.5.0.alpha.2 test/command/spec_pione-compile.rb
pione-0.5.0.alpha.1 test/command/spec_pione-compile.rb
pione-0.4.2 test/command/spec_pione-compile.rb
pione-0.4.1 test/command/spec_pione-compile.rb
pione-0.4.0 test/command/spec_pione-compile.rb