summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-02-18 10:29:07 -0600
committerLuke Kanies <luke@madstop.com>2008-02-18 10:29:07 -0600
commitd11cd39024e1baa5988e587e34fad65bb116ea01 (patch)
tree1fee4a1cfa90caf0053c216c10c0078cd100db48
parent62d7616a457f33eb660454fcdcefe8dab84522c0 (diff)
downloadpuppet-d11cd39024e1baa5988e587e34fad65bb116ea01.tar.gz
puppet-d11cd39024e1baa5988e587e34fad65bb116ea01.tar.xz
puppet-d11cd39024e1baa5988e587e34fad65bb116ea01.zip
Fixing a failing test that resulted from a change
in how checksums are created.
-rwxr-xr-xspec/unit/file_serving/metadata.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/spec/unit/file_serving/metadata.rb b/spec/unit/file_serving/metadata.rb
index f7ab0c8d6..d31dd21f0 100755
--- a/spec/unit/file_serving/metadata.rb
+++ b/spec/unit/file_serving/metadata.rb
@@ -58,10 +58,11 @@ describe Puppet::FileServing::Metadata, " when collecting attributes" do
@stat = stub 'stat', :uid => 10, :gid => 20, :mode => 0755, :ftype => "file"
File.stubs(:lstat).returns(@stat)
@filehandle = mock 'filehandle'
- @filehandle.expects(:each_line).yields("some content\n")
+ #@filehandle.expects(:read).with(512).returns("some content\n").then.returns(nil)
File.stubs(:open).with(@path, 'r').yields(@filehandle)
@checksum = Digest::MD5.hexdigest("some content\n")
@metadata = Puppet::FileServing::Metadata.new("file", :path => "/my/file")
+ @metadata.expects(:md5_file).returns(@checksum)
@metadata.collect_attributes
end