Sha256: f19b3b972d6dcbc37e5fcc5417d85242bcec0e55275d6b343ed73b7024d60c44

Contents?: true

Size: 494 Bytes

Versions: 8

Compression:

Stored size: 494 Bytes

Contents

require File.dirname(__FILE__) + '/../spec_helper'

describe Cachetastic::Cache::StoreObject do
  
  describe 'expired?' do
    
    it 'should return true if the object is expired' do
      obj = Cachetastic::Cache::StoreObject.new(nil, nil, 1.minute.ago)
      obj.should be_expired
    end
    
    it 'should return false if the object is not expired' do
      obj = Cachetastic::Cache::StoreObject.new(nil, nil, 1.minute.from_now)
      obj.should_not be_expired
    end
    
  end
  
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
cachetastic-3.7.0 spec/cachetastic/store_object_spec.rb
cachetastic-3.6.0 spec/cachetastic/store_object_spec.rb
cachetastic-3.5.3 spec/cachetastic/store_object_spec.rb
cachetastic-3.5.2 spec/cachetastic/store_object_spec.rb
cachetastic-3.5.1 spec/cachetastic/store_object_spec.rb
cachetastic-3.5.0 spec/cachetastic/store_object_spec.rb
cachetastic-3.2.0 spec/cachetastic/store_object_spec.rb
cachetastic-3.1.0 spec/cachetastic/store_object_spec.rb