summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorBryan McLellan <btm@loftninjas.org>2014-03-19 18:14:05 -0400
committerBryan McLellan <btm@loftninjas.org>2014-03-19 18:14:05 -0400
commit3929b2bd0169d8784d4cb3c1af41756785c7afce (patch)
treecf19771c234c5f1cb7ff0010c16b2cc048ec4bdd /spec
parent0ca71108f72bd5ebfae88cffdfe8b38d69f1b841 (diff)
parent0fef07d7f50758f067913ee81f9feed5c0b3fb70 (diff)
downloadchef-3929b2bd0169d8784d4cb3c1af41756785c7afce.tar.gz
Merge pull request #1321 from opscode/btm/CHEF-3714
CHEF-3714: add a file_edited? method
Diffstat (limited to 'spec')
-rw-r--r--spec/unit/util/file_edit_spec.rb8
1 files changed, 8 insertions, 0 deletions
diff --git a/spec/unit/util/file_edit_spec.rb b/spec/unit/util/file_edit_spec.rb
index 9acfb1baea..139b29d9ce 100644
--- a/spec/unit/util/file_edit_spec.rb
+++ b/spec/unit/util/file_edit_spec.rb
@@ -213,4 +213,12 @@ twice
expect(edited_file_contents).to eq(append_twice)
end
end
+
+ describe "file_edited" do
+ it "should return true if a file got edited" do
+ fedit.insert_line_if_no_match(/pattern/, "new line inserted")
+ fedit.write_file
+ expect(fedit.file_edited?).to be_true
+ end
+ end
end