diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-02-03 21:17:34 +0300 |
commit | 0aa20f3dac8e19cc10b62e08a5c84df105a648c2 (patch) | |
tree | 3347e2aa05c399d70f82775fa58ffd4b531ba282 /spec/tooling/lib | |
parent | 67daaf4021a180166ad063e3a75ea777e96586a6 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/tooling/lib')
-rw-r--r-- | spec/tooling/lib/tooling/test_map_generator_spec.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/spec/tooling/lib/tooling/test_map_generator_spec.rb b/spec/tooling/lib/tooling/test_map_generator_spec.rb index eb49b1db20e..b52d78b01a3 100644 --- a/spec/tooling/lib/tooling/test_map_generator_spec.rb +++ b/spec/tooling/lib/tooling/test_map_generator_spec.rb @@ -39,11 +39,23 @@ RSpec.describe Tooling::TestMapGenerator do YAML end + let(:yaml3) do + <<~YAML + --- + :type: Crystalball::ExecutionMap + :commit: 74056e8d9cf3773f43faa1cf5416f8779c8284c9 + :timestamp: 1602671965 + :version: + --- + YAML + end + let(:pathname) { instance_double(Pathname) } before do stub_file_read('yaml1.yml', content: yaml1) stub_file_read('yaml2.yml', content: yaml2) + stub_file_read('yaml3.yml', content: yaml3) end context 'with single yaml' do @@ -74,6 +86,10 @@ RSpec.describe Tooling::TestMapGenerator do expect(subject.mapping[file]).to match_array(tests) end end + + it 'displays a warning when report has no examples' do + expect { subject.parse('yaml3.yml') }.to output(%|No examples in yaml3.yml! Metadata: {:type=>"Crystalball::ExecutionMap", :commit=>"74056e8d9cf3773f43faa1cf5416f8779c8284c9", :timestamp=>1602671965, :version=>nil}\n|).to_stdout + end end context 'with multiple yamls' do |