diff options
-rw-r--r-- | spec/unit/util/file_edit_spec.rb | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/spec/unit/util/file_edit_spec.rb b/spec/unit/util/file_edit_spec.rb index 3d20939469..0bf212d8fa 100644 --- a/spec/unit/util/file_edit_spec.rb +++ b/spec/unit/util/file_edit_spec.rb @@ -95,12 +95,17 @@ new line inserted describe "initialiize" do it "should create a new Chef::Util::FileEdit object" do - expect(fedit).to be_kind_of(Chef::Util::FileEdit) + expect(fedit).to be_instance_of(Chef::Util::FileEdit) end it "should throw an exception if the input file does not exist" do expect{Chef::Util::FileEdit.new("nonexistfile")}.to raise_error(ArgumentError) end + + # CHEF-5018: people have monkey patched this and it has accidentally been broken + it "should read the contents into memory as an array" do + expect(fedit.send(:contents)).to be_instance_of(Array) + end end describe "when the file is blank" do |