Fix deep merging of yml files

This commit is contained in:
2015-04-08 18:22:23 +02:00
parent 20ebd784fc
commit 1b82ab1784
3 changed files with 43 additions and 15 deletions
+28
View File
@@ -0,0 +1,28 @@
require 'spec_helper'
describe Cmtool::YmlFile do
describe ".all_as_object" do
it "combines the files using deep merge" do
described_class.create body: <<-YML.strip_heredoc
nl:
android:
link: <a>l</a>
YML
described_class.create body: <<-YML.strip_heredoc
nl:
android:
title: Mozo at Play store
YML
result = described_class.all_as_object
result.should =~ {
"nl"=> {
"android" => {
"title"=>"Mozo at Play store",
"link"=>"<a>l</a>"
}
}
}
end
end
end