Sha256: 003621b6c3f295b84782bb26dc5debaa7dbbd0c9f9e3743bb792194c82cc0d62

Contents?: true

Size: 1.87 KB

Versions: 2

Compression:

Stored size: 1.87 KB

Contents

require_relative '../test-util'
require_relative 'command-behavior'

describe "Pione::Command::PioneClient" do
  behaves_like "command"

  ### is this wrong?
  # it "should execute a PIONE document" do
  #   path = Temppath.create
  #   args = ["example/HelloWorld/HelloWorld.pione", "-o", path.to_s]
  #   res = TestUtil::Command.succeed do
  #     Pione::Command::PioneClient.run args
  #   end
  #   Location[path + "message.txt"].should.exist
  #   Location[path + "message.txt"].read.should.start_with "Hello, world!"
  # end

  it "should execute a PIONE document with stand alone mode" do
    path = Temppath.create
    args = ["example/HelloWorld/HelloWorld.pione", "-o", path.to_s, "--stand-alone"]
    res = TestUtil::Command.succeed do
      Pione::Command::PioneClient.run args
    end
    Location[path + "message.txt"].should.exist
    Location[path + "message.txt"].read.should.start_with "Hello, world!"
  end

  # it "should execute a PIONE package" do
  #   path = Temppath.create
  #   args = ["example/HelloWorld/", "-o", path.to_s]
  #   res = TestUtil::Command.succeed do
  #     Pione::Command::PioneClient.run args
  #   end
  #   Location[path + "message.txt"].should.exist
  #   Location[path + "message.txt"].read.should.start_with "Hello, world!"
  # end

  it "should execute a PIONE package with stand alone mode" do
    path = Temppath.create
    args = ["example/HelloWorld/", "-o", path.to_s, "--stand-alone"]
    res = TestUtil::Command.succeed do
      Pione::Command::PioneClient.run args
    end
    Location[path + "message.txt"].should.exist
    Location[path + "message.txt"].read.should.start_with "Hello, world!"
  end

  it "should show parameters list of package" do
    args = ["example/HelloWorld/HelloWorld.pione", "--list-params"]
    res = TestUtil::Command.succeed do
      Pione::Command::PioneClient.run args
    end
    res.stdout.string.size.should > 0
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
pione-0.2.2 test/command/spec_pione-client.rb
pione-0.2.1 test/command/spec_pione-client.rb