Skip to content

Commit 1afcbd7

Browse files
author
Kevin Paulisse
committed
100% test coverage
1 parent 721921f commit 1afcbd7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

spec/octocatalog-diff/tests/catalog-util/builddir_spec.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,18 @@
201201
expect(hiera_cfg[:yaml]).to eq(datadir: File.join(testobj.tempdir, 'environments', 'production', 'hieradata'))
202202
end
203203
end
204+
205+
context 'testing for ArgumentError' do
206+
it 'should raise ArgumentError if hiera_config is not a string' do
207+
options = default_options.merge(
208+
hiera_config: :chicken
209+
)
210+
logger, _logger_str = OctocatalogDiff::Spec.setup_logger
211+
expect do
212+
OctocatalogDiff::CatalogUtil::BuildDir.new(options, logger)
213+
end.to raise_error(ArgumentError, /Called install_hiera_config with a Symbol argument/)
214+
end
215+
end
204216
end
205217

206218
describe '#install_fact_file' do

0 commit comments

Comments
 (0)