Sha256: f5a105ece2dc45b35cea6a5eb2138ce780347ee03c0c96bbc432e73512045375

Contents?: true

Size: 605 Bytes

Versions: 1

Compression:

Stored size: 605 Bytes

Contents

#encoding: utf-8

require 'spec_helper'

describe Formatter::JSON do
  before :each do
    @formatter = Formatter::JSON.new
  end

  it "outputs data as json string" do
      @formatter.stderr(["output of stderr"])
      @formatter.stdout("output of stdout")
      @formatter.log_file("output of log file")
      @formatter.return_code("output of return code")
      @formatter.pid(4711)
      @formatter.status(:failed)
      @formatter.executable('/usr/bin/true')

      expect(@formatter.output(:stdout,:stderr)).to eq("{\"stdout\":[\"output of stdout\"],\"stderr\":[\"output of stderr\"]}")
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
command_exec-0.2.0 spec/formatter/json_spec.rb