Sha256: c55cb9791eda6650d9e26feccc07de7e39449d091d3c81db2fd4f0c41ae52ea2

Contents?: true

Size: 718 Bytes

Versions: 2

Compression:

Stored size: 718 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 "should return a hash" do
    @result.inspect.should be_kind_of(Hash)
  end

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

  it "should have total time" do
    timer = ShellTastic::Timer.new
    @result.start = timer.start
    @result.stop  = timer.stop
    @result.total_time = timer.total_time
    @result.total_time.should_not be_nil
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
shelltastic-0.5.0 spec/output_formatter_spec.rb
shelltastic-0.4.0 spec/output_formatter_spec.rb