summaryrefslogtreecommitdiffstats
path: root/spec/unit/file_collection_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/file_collection_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/file_collection_spec.rb')
-rwxr-xr-xspec/unit/file_collection_spec.rb53
1 files changed, 0 insertions, 53 deletions
diff --git a/spec/unit/file_collection_spec.rb b/spec/unit/file_collection_spec.rb
deleted file mode 100755
index 81bcc2d2d..000000000
--- a/spec/unit/file_collection_spec.rb
+++ /dev/null
@@ -1,53 +0,0 @@
-#!/usr/bin/env ruby
-
-require File.dirname(__FILE__) + '/../spec_helper'
-
-require 'puppet/file_collection'
-
-describe Puppet::FileCollection do
- before do
- @collection = Puppet::FileCollection.new
- end
-
- it "should be able to convert a file name into an index" do
- @collection.index("/my/file").should be_instance_of(Fixnum)
- end
-
- it "should be able to convert an index into a file name" do
- index = @collection.index("/path/to/file")
- @collection.path(index).should == "/path/to/file"
- end
-
- it "should always give the same file name for a given index" do
- index = @collection.index("/path/to/file")
- @collection.path(index).should == @collection.path(index)
- end
-
- it "should always give the same index for a given file name" do
- @collection.index("/my/file").should == @collection.index("/my/file")
- end
-
- it "should always correctly relate a file name and its index even when multiple files are in the collection" do
- indexes = %w{a b c d e f}.inject({}) do |hash, letter|
- hash[letter] = @collection.index("/path/to/file/%s" % letter)
- hash
- end
-
- indexes.each do |letter, index|
- @collection.index("/path/to/file/%s" % letter).should == indexes[letter]
- @collection.path(index).should == @collection.path(index)
- end
- end
-
- it "should return nil as the file name when an unknown index is provided" do
- @collection.path(50).should be_nil
- end
-
- it "should provide a global collection" do
- Puppet::FileCollection.collection.should be_instance_of(Puppet::FileCollection)
- end
-
- it "should reuse the global collection" do
- Puppet::FileCollection.collection.should equal(Puppet::FileCollection.collection)
- end
-end