diff options
| author | Luke Kanies <luke@madstop.com> | 2007-10-22 22:37:52 -0500 |
|---|---|---|
| committer | Luke Kanies <luke@madstop.com> | 2007-10-22 22:37:52 -0500 |
| commit | de5d91e2036de2934a4eec79d35a714f3ed24b10 (patch) | |
| tree | 1f6c074f749b9eb513baefaac7ac7cc952b381cb /spec | |
| parent | 7fa99b08f9aa3777fba82f24eb5bb391f3758f48 (diff) | |
| download | puppet-de5d91e2036de2934a4eec79d35a714f3ed24b10.tar.gz puppet-de5d91e2036de2934a4eec79d35a714f3ed24b10.tar.xz puppet-de5d91e2036de2934a4eec79d35a714f3ed24b10.zip | |
Renaming the :local termini for metadata and content
to :file.
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/lib/shared_behaviours/file_serving.rb | 8 | ||||
| -rwxr-xr-x | spec/unit/file_serving/terminus_selector.rb | 14 | ||||
| -rwxr-xr-x | spec/unit/indirector/file_content/file.rb (renamed from spec/unit/indirector/file_content/local.rb) | 20 | ||||
| -rwxr-xr-x | spec/unit/indirector/file_metadata/file.rb (renamed from spec/unit/indirector/file_metadata/local.rb) | 14 |
4 files changed, 28 insertions, 28 deletions
diff --git a/spec/lib/shared_behaviours/file_serving.rb b/spec/lib/shared_behaviours/file_serving.rb index b0aa14fc0..6eaec6850 100644 --- a/spec/lib/shared_behaviours/file_serving.rb +++ b/spec/lib/shared_behaviours/file_serving.rb @@ -36,15 +36,15 @@ describe "Puppet::FileServing::Files", :shared => true do @test_class.find(uri) end - it "should use the local terminus when the 'file' URI scheme is used" do + it "should use the file terminus when the 'file' URI scheme is used" do uri = "file:///mymod/my/file" - @indirection.terminus(:local).expects(:find).with(uri) + @indirection.terminus(:file).expects(:find).with(uri) @test_class.find(uri) end - it "should use the local terminus when a fully qualified path is provided" do + it "should use the file terminus when a fully qualified path is provided" do uri = "/mymod/my/file" - @indirection.terminus(:local).expects(:find).with(uri) + @indirection.terminus(:file).expects(:find).with(uri) @test_class.find(uri) end end diff --git a/spec/unit/file_serving/terminus_selector.rb b/spec/unit/file_serving/terminus_selector.rb index 046f71bdc..9c2c01bfd 100755 --- a/spec/unit/file_serving/terminus_selector.rb +++ b/spec/unit/file_serving/terminus_selector.rb @@ -65,17 +65,17 @@ describe Puppet::FileServing::TerminusSelector, " when being used to select term @object.select_terminus("puppet:///module/file").should == :rest end - it "should choose :local when the protocol is 'file'" do - @object.select_terminus("file://host/module/file").should == :local + it "should choose :file when the protocol is 'file'" do + @object.select_terminus("file://host/module/file").should == :file end - it "should choose :local when the URI is a normal path name" do - @object.select_terminus("/module/file").should == :local + it "should choose :file when the URI is a normal path name" do + @object.select_terminus("/module/file").should == :file end - # This is so that we only choose modules over mounts, not local - it "should choose :local when the protocol is 'file' and the fully qualified path starts with '/modules'" do - @object.select_terminus("file://host/modules/file").should == :local + # This is so that we only choose modules over mounts, not file + it "should choose :file when the protocol is 'file' and the fully qualified path starts with '/modules'" do + @object.select_terminus("file://host/modules/file").should == :file end it "should fail when a protocol other than :puppet, :file, or :puppetmounts is used" do diff --git a/spec/unit/indirector/file_content/local.rb b/spec/unit/indirector/file_content/file.rb index 442667518..da2c90770 100755 --- a/spec/unit/indirector/file_content/local.rb +++ b/spec/unit/indirector/file_content/file.rb @@ -5,21 +5,21 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_content/local' +require 'puppet/indirector/file_content/file' -describe Puppet::Indirector::FileContent::Local do +describe Puppet::Indirector::FileContent::File do it "should be registered with the file_content indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_content, :local).should equal(Puppet::Indirector::FileContent::Local) + Puppet::Indirector::Terminus.terminus_class(:file_content, :file).should equal(Puppet::Indirector::FileContent::File) end it "should be a subclass of the File terminus" do - Puppet::Indirector::FileContent::Local.superclass.should equal(Puppet::Indirector::File) + Puppet::Indirector::FileContent::File.superclass.should equal(Puppet::Indirector::File) end end -describe Puppet::Indirector::FileContent::Local, "when finding a single file" do +describe Puppet::Indirector::FileContent::File, "when finding a single file" do it "should return a Content instance created with the full path to the file if the file exists" do - @content = Puppet::Indirector::FileContent::Local.new + @content = Puppet::Indirector::FileContent::File.new @uri = "file:///my/local" FileTest.expects(:exists?).with("/my/local").returns true @@ -28,7 +28,7 @@ describe Puppet::Indirector::FileContent::Local, "when finding a single file" do end it "should pass the :links setting on to the created Content instance if the file exists" do - @content = Puppet::Indirector::FileContent::Local.new + @content = Puppet::Indirector::FileContent::File.new @uri = "file:///my/local" FileTest.expects(:exists?).with("/my/local").returns true @@ -37,7 +37,7 @@ describe Puppet::Indirector::FileContent::Local, "when finding a single file" do end it "should return nil if the file does not exist" do - @content = Puppet::Indirector::FileContent::Local.new + @content = Puppet::Indirector::FileContent::File.new @uri = "file:///my/local" FileTest.expects(:exists?).with("/my/local").returns false @@ -45,9 +45,9 @@ describe Puppet::Indirector::FileContent::Local, "when finding a single file" do end end -describe Puppet::Indirector::FileContent::Local, "when searching for multiple files" do +describe Puppet::Indirector::FileContent::File, "when searching for multiple files" do before do - @content = Puppet::Indirector::FileContent::Local.new + @content = Puppet::Indirector::FileContent::File.new @uri = "file:///my/local" end diff --git a/spec/unit/indirector/file_metadata/local.rb b/spec/unit/indirector/file_metadata/file.rb index 289aee449..c88d559a7 100755 --- a/spec/unit/indirector/file_metadata/local.rb +++ b/spec/unit/indirector/file_metadata/file.rb @@ -5,17 +5,17 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_metadata/local' +require 'puppet/indirector/file_metadata/file' -describe Puppet::Indirector::FileMetadata::Local do +describe Puppet::Indirector::FileMetadata::File do it "should be registered with the file_metadata indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_metadata, :local).should equal(Puppet::Indirector::FileMetadata::Local) + Puppet::Indirector::Terminus.terminus_class(:file_metadata, :file).should equal(Puppet::Indirector::FileMetadata::File) end end -describe Puppet::Indirector::FileMetadata::Local, "when finding a single file" do +describe Puppet::Indirector::FileMetadata::File, "when finding a single file" do before do - @metadata = Puppet::Indirector::FileMetadata::Local.new + @metadata = Puppet::Indirector::FileMetadata::File.new @uri = "file:///my/local" @data = mock 'metadata' @@ -51,9 +51,9 @@ describe Puppet::Indirector::FileMetadata::Local, "when finding a single file" d end end -describe Puppet::Indirector::FileMetadata::Local, "when searching for multiple files" do +describe Puppet::Indirector::FileMetadata::File, "when searching for multiple files" do before do - @metadata = Puppet::Indirector::FileMetadata::Local.new + @metadata = Puppet::Indirector::FileMetadata::File.new @uri = "file:///my/local" end |
