Sha256: 7ac23bc41f0714ec9d6b8b6f51983e3e420eaf4b959a65fb79e45dda8095c214

Contents?: true

Size: 715 Bytes

Versions: 1

Compression:

Stored size: 715 Bytes

Contents

require 'spec_helper'

describe ShellTastic::OutputFormatter do
  before :each do
    @result = ShellTastic::OutputFormatter.new
    @result.build(output: "Fri Feb 14 20:54:59 MST 2014",
                  pid: "10000000",
                  error: "No such file or directory")
  end
  it "returns a hash" do
    expect(@result.inspect).to be_kind_of(Hash)
  end

  it "allows to add key value pairs" do
    @result.command = "date"
    expect(@result.inspect[:command]).to eq("date")
  end

  it "contains total time" do
    timer = ShellTastic::Timer.new
    @result.start = timer.start
    @result.stop  = timer.stop
    @result.total_time = timer.total_time
    expect(@result.total_time).to_not be_nil
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shelltastic-1.0.0 spec/output_formatter_spec.rb