From 64c6700bc7530f1213e124d248cc176a7cfe6180 Mon Sep 17 00:00:00 2001 From: Luke Kanies Date: Thu, 18 Oct 2007 14:43:08 -0500 Subject: Fixing all of the classes that I just renamed, and adding the TerminusSelector module to the File Metadata indirection. --- spec/unit/file_serving/metadata.rb | 4 ++++ spec/unit/indirector/file_content/local.rb | 18 +++++++++--------- spec/unit/indirector/file_metadata/local.rb | 6 +++--- 3 files changed, 16 insertions(+), 12 deletions(-) (limited to 'spec') diff --git a/spec/unit/file_serving/metadata.rb b/spec/unit/file_serving/metadata.rb index c93465a45..f54a6feb6 100755 --- a/spec/unit/file_serving/metadata.rb +++ b/spec/unit/file_serving/metadata.rb @@ -8,6 +8,10 @@ describe Puppet::FileServing::Metadata do it "should indirect file_metadata" do Puppet::FileServing::Metadata.indirection.name.should == :file_metadata end + + it "should should include the TerminusSelector module in its indirection" do + Puppet::FileServing::Metadata.indirection.metaclass.included_modules.should include(Puppet::FileServing::TerminusSelector) + end end describe Puppet::FileServing::Metadata, " when initializing" do diff --git a/spec/unit/indirector/file_content/local.rb b/spec/unit/indirector/file_content/local.rb index 08f66acb6..81ebd8ed0 100755 --- a/spec/unit/indirector/file_content/local.rb +++ b/spec/unit/indirector/file_content/local.rb @@ -5,25 +5,25 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_content/file' +require 'puppet/indirector/file_content/local' -describe Puppet::Indirector::FileContent::File do +describe Puppet::Indirector::FileContent::Local do it "should be registered with the file_content indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_content, :file).should equal(Puppet::Indirector::FileContent::File) + Puppet::Indirector::Terminus.terminus_class(:file_content, :local).should equal(Puppet::Indirector::FileContent::Local) end it "should be a subclass of the File terminus" do - Puppet::Indirector::FileContent::File.superclass.should equal(Puppet::Indirector::File) + Puppet::Indirector::FileContent::Local.superclass.should equal(Puppet::Indirector::File) end end -describe Puppet::Indirector::FileContent::File, "when finding a single file" do +describe Puppet::Indirector::FileContent::Local, "when finding a single local" do before do - @content = Puppet::Indirector::FileContent::File.new - @path = "/my/file" + @content = Puppet::Indirector::FileContent::Local.new + @path = "/my/local" end - it "should return nil if the file does not exist" + it "should return nil if the local does not exist" - it "should return a Content instance with the path set to the file if the file exists" + it "should return a Content instance with the path set to the local if the local exists" end diff --git a/spec/unit/indirector/file_metadata/local.rb b/spec/unit/indirector/file_metadata/local.rb index 0b0219980..26837b911 100755 --- a/spec/unit/indirector/file_metadata/local.rb +++ b/spec/unit/indirector/file_metadata/local.rb @@ -5,10 +5,10 @@ require File.dirname(__FILE__) + '/../../../spec_helper' -require 'puppet/indirector/file_metadata/ral' +require 'puppet/indirector/file_metadata/local' -describe Puppet::Indirector::FileMetadata::Ral do +describe Puppet::Indirector::FileMetadata::Local do it "should be registered with the file_metadata indirection" do - Puppet::Indirector::Terminus.terminus_class(:file_metadata, :ral).should equal(Puppet::Indirector::FileMetadata::Ral) + Puppet::Indirector::Terminus.terminus_class(:file_metadata, :local).should equal(Puppet::Indirector::FileMetadata::Local) end end -- cgit