Sha256: 805039f6b0328a1b346b7fa8f6e53298e38a11da24730b341bb9eec9479c8f1e

Contents?: true

Size: 476 Bytes

Versions: 1

Compression:

Stored size: 476 Bytes

Contents

require 'spec_helper'

describe ShellTastic::Timer do
  it "reports start time" do
    start = ShellTastic::Timer.new.start
    expect(start.class).to eq(Time)
  end

  it "reports the stop time" do
    stop = ShellTastic::Timer.new.stop
    expect(stop.class).to eq(Time)
  end

  it "reports total time" do
    timer = ShellTastic::Timer.new
    start = timer.start
    sleep 2
    stop  = timer.stop
    total = timer.total_time
    expect(total.round).to eq(2)
  end

end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
shelltastic-1.0.0 spec/timer_spec.rb