Sha256: 7720166c302fc9876408f43387d6b899ba2501b8510b8a3639fffa4dafb69140
Contents?: true
Size: 944 Bytes
Versions: 92
Compression:
Stored size: 944 Bytes
Contents
#! /usr/bin/env ruby require 'spec_helper' require 'puppet/indirector/envelope' describe Puppet::Indirector::Envelope do before do @instance = Object.new @instance.extend(Puppet::Indirector::Envelope) end describe "when testing if it is expired" do it "should return false if there is no expiration set" do @instance.should_not be_expired end it "should return true if the current date is after the expiration date" do @instance.expiration = Time.now - 10 @instance.should be_expired end it "should return false if the current date is prior to the expiration date" do @instance.expiration = Time.now + 10 @instance.should_not be_expired end it "should return false if the current date is equal to the expiration date" do now = Time.now Time.stubs(:now).returns(now) @instance.expiration = now @instance.should_not be_expired end end end
Version data entries
92 entries across 92 versions & 2 rubygems