Extending a non-existent parent yells at you now

Fixes #24
This commit is contained in:
Andy Meneely
2015-01-05 23:59:09 -05:00
parent 845123a283
commit 73d6eb992b
5 changed files with 45 additions and 1 deletions
+3
View File
@@ -0,0 +1,3 @@
verbal:
extends: kaisersoze
font_size: 25
+13
View File
@@ -173,4 +173,17 @@ describe Squib::LayoutParser do
Squib::LayoutParser.load_layout('yeti')
end
it 'freaks out if you extend something doesn\'t exist' do
expect(Squib.logger)
.to receive(:error)
.with("Processing layout: 'verbal' attempts to extend a missing 'kaisersoze'")
layout = Squib::LayoutParser.load_layout(layout_file('extends-nonexists.yml'))
expect(layout).to eq({
'verbal' => {
'font_size' => 25,
'extends' => 'kaisersoze'
}
})
end
end