summaryrefslogtreecommitdiffstats
path: root/spec/unit/indirector/envelope_spec.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-28 16:32:11 -0700
committerMarkus Roberts <Markus@reality.com>2010-06-28 16:32:11 -0700
commit9ceb4540a567b0a9de85af5397df4a292303a9c3 (patch)
tree30d1e1601888381baaaa14bfc5ee7246fd5c78e8 /spec/unit/indirector/envelope_spec.rb
parent85638cf427fe9b35d3e3b0fa4ce919c5806c60d3 (diff)
downloadpuppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.gz
puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.xz
puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.zip
[#3994-part 2] rename integration tests to *_spec.rb
Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson <matt@puppetlabs.com> Date: Fri Jun 11 15:29:33 2010 -0700
Diffstat (limited to 'spec/unit/indirector/envelope_spec.rb')
-rwxr-xr-xspec/unit/indirector/envelope_spec.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/unit/indirector/envelope_spec.rb b/spec/unit/indirector/envelope_spec.rb
deleted file mode 100755
index 17c62023a..000000000
--- a/spec/unit/indirector/envelope_spec.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../../spec_helper'
-require 'puppet/indirector/envelope'
-
-describe Puppet::Indirector::Envelope do
- before do
- @instance = Object.new
- @instance.extend(Puppet::Indirector::Envelope)
- end
-
- it "should have an expiration accessor" do
- @instance.expiration = "testing"
- @instance.expiration.should == "testing"
- end
-
- it "should have an expiration setter" do
- @instance.should respond_to(:expiration=)
- end
-
- it "should have a means of testing whether it is expired" do
- @instance.should respond_to(:expired?)
- 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