File tree Expand file tree Collapse file tree
spec/octocatalog-diff/tests Expand file tree Collapse file tree Original file line number Diff line number Diff line change 483483 end
484484 end
485485
486+ describe '#format_missing_references' do
487+ before ( :each ) do
488+ opts = { json : File . read ( OctocatalogDiff ::Spec . fixture_path ( 'catalogs/reference-validation-broken.json' ) ) }
489+ @test_obj = OctocatalogDiff ::Catalog . new ( opts )
490+ end
491+
492+ context 'with invalid input' do
493+ it 'should raise ArgumentError if non-array is provided' do
494+ expect do
495+ @test_obj . send ( :format_missing_references , 'Hi there' )
496+ end . to raise_error ( ArgumentError , /format_missing_references\( \) requires a non-empty array as input/ )
497+ end
498+
499+ it 'should raise ArgumentError if empty array is provided' do
500+ expect do
501+ @test_obj . send ( :format_missing_references , [ ] )
502+ end . to raise_error ( ArgumentError , /format_missing_references\( \) requires a non-empty array as input/ )
503+ end
504+ end
505+
506+ context 'with compilation directory specified and matching' do
507+ it 'should strip compilation directory' do
508+ end
509+ end
510+
511+ context 'with compilation directory specified and not matching' do
512+ it 'should not strip compilation directory' do
513+ end
514+ end
515+
516+ context 'with compilation directory not specified' do
517+ it 'should not strip compilation directory' do
518+ end
519+ end
520+ end
521+
486522 describe '#build_resource_hash' do
487523 before ( :each ) do
488524 resource_array = [
You can’t perform that action at this time.
0 commit comments