From 7804b5459d1fa0e867fc760ff000e30f30bd89c2 Mon Sep 17 00:00:00 2001 From: Andy Meneely Date: Wed, 27 Nov 2019 00:28:18 -0500 Subject: [PATCH] add new test for my own sanity --- spec/args/input_file_spec.rb | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/spec/args/input_file_spec.rb b/spec/args/input_file_spec.rb index 3289bc6..c6c17d1 100644 --- a/spec/args/input_file_spec.rb +++ b/spec/args/input_file_spec.rb @@ -18,4 +18,19 @@ describe Squib::Args::InputFile do end end + + context 'layouts' do + let(:layout) do + { 'attack' => { 'file' => __FILE__ }, + 'defend' => { 'file' => 'lib/squib.rb' } } #these files DEFINITELY exist + end + + it 'allows layout expansion' do + args = { layout: ['attack', 'defend'] } + ifile.load!(args, expand_by: 2, layout: layout) + expect(ifile[0].file).to end_with(__FILE__) + expect(ifile[1].file).to end_with('lib/squib.rb') + end + end + end