spec/unit/util/checksums_spec.rb in puppet-3.3.2 vs spec/unit/util/checksums_spec.rb in puppet-3.4.0.rc1
- old
+ new
@@ -130,10 +130,11 @@
describe("when using #{sum}") do
it "should use the '#{sum}' on the file to determine the ctime" do
file = "/my/file"
stat = mock 'stat', sum => "mysum"
- File.expects(:stat).with(file).returns(stat)
+ stub_file = stub(file, :stat => stat)
+ Puppet::FileSystem::File.expects(:new).with(file).returns stub_file
@summer.send(sum.to_s + "_file", file).should == "mysum"
end
it "should return nil for streams" do