summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/type/file/content_spec.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/spec/unit/type/file/content_spec.rb b/spec/unit/type/file/content_spec.rb
index f1001aa8c..2c00e50dc 100755
--- a/spec/unit/type/file/content_spec.rb
+++ b/spec/unit/type/file/content_spec.rb
@@ -175,14 +175,15 @@ describe content do
it "should display a diff if the current contents are different from the desired content" do
@content.should = "some content"
- @content.expects(:string_file_diff).once
+ @content.expects(:diff).returns("my diff").once
+ @content.expects(:print).with("my diff").once
@content.insync?("other content")
end
it "should not display a diff if the sum for the current contents is the same as the sum for the desired content" do
@content.should = "some content"
- @content.expects(:string_file_diff).never
+ @content.expects(:diff).never
@content.insync?("{md5}" + Digest::MD5.hexdigest("some content"))
end