Sha256: 6db981fe2526f05c1a64c67e2ef3283f1842f17009bdd98ef0642bf0989361ad

Contents?: true

Size: 869 Bytes

Versions: 3

Compression:

Stored size: 869 Bytes

Contents

require 'pione/test-helper'
require_relative 'command-behavior'

describe "Pione::Command::PioneLog" do
  raw_log_location = Location[File.dirname(__FILE__)] + "data" + "pione-process.log"

  behaves_like "command"

  it "should generate rule process log" do
    res = TestHelper::Command.succeed do
      Command::PioneLog.run ["--rule-process", "--location", raw_log_location.path.to_s]
    end
    res.stdout.string.chomp.size.should > 0
  end

  it "should generate task process log" do
    res = TestHelper::Command.succeed do
      Command::PioneLog.run ["--task-process", "--location", raw_log_location.path.to_s]
    end
    res.stdout.string.chomp.size.should > 0
  end

  it "should fail if format is unknown" do
    res = TestHelper::Command.fail do
      Command::PioneLog.run ["--format", "xxx", "--location", raw_log_location.path.to_s]
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
pione-0.3.2 test/command/spec_pione-log.rb
pione-0.3.1 test/command/spec_pione-log.rb
pione-0.3.0 test/command/spec_pione-log.rb