Sha256: 398afd21ad6bdc8f3077bc8a1d86ab3b86d3d5a99d0bdf03dd9bc1c81c307de5

Contents?: true

Size: 338 Bytes

Versions: 4

Compression:

Stored size: 338 Bytes

Contents

# encoding: utf-8

require 'spec_helper'

describe Time, '#pred' do
  subject { object.pred }

  let(:object) { described_class.now }

  it { should be_instance_of(described_class) }

  it 'returns the time 1 second ago' do
    should eql(object - 1)
  end

  it 'is the inverse of #succ' do
    subject.succ.should eql(object)
  end
end

Version data entries

4 entries across 4 versions & 2 rubygems

Version Path
axiom-0.1.0 spec/unit/time/pred_spec.rb
veritas-0.0.7 spec/unit/time/pred_spec.rb
veritas-0.0.6 spec/unit/time/pred_spec.rb
veritas-0.0.5 spec/unit/time/pred_spec.rb