diff options
Diffstat (limited to 'spec/lib')
-rw-r--r-- | spec/lib/gitlab/ci/parsers_spec.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/spec/lib/gitlab/ci/parsers_spec.rb b/spec/lib/gitlab/ci/parsers_spec.rb new file mode 100644 index 00000000000..2fa83c4abae --- /dev/null +++ b/spec/lib/gitlab/ci/parsers_spec.rb @@ -0,0 +1,23 @@ +require 'spec_helper' + +describe Gitlab::Ci::Parsers do + describe '.fabricate!' do + subject { described_class.fabricate!(file_type) } + + context 'when file_type exists' do + let(:file_type) { 'junit' } + + it 'fabricates the class' do + is_expected.to be_a(described_class::Junit) + end + end + + context 'when file_type does not exist' do + let(:file_type) { 'undefined' } + + it 'raises an error' do + expect { subject }.to raise_error(NameError) + end + end + end +end |