diff options
Diffstat (limited to 'vendor/gems/ipynbdiff/spec/transformer_spec.rb')
-rw-r--r-- | vendor/gems/ipynbdiff/spec/transformer_spec.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/vendor/gems/ipynbdiff/spec/transformer_spec.rb b/vendor/gems/ipynbdiff/spec/transformer_spec.rb index c5873906ca9..660d0a2bd79 100644 --- a/vendor/gems/ipynbdiff/spec/transformer_spec.rb +++ b/vendor/gems/ipynbdiff/spec/transformer_spec.rb @@ -102,5 +102,16 @@ describe IpynbDiff::Transformer do end end end + + context 'when notebook can not be parsed' do + it 'raises error' do + notebook = '{"cells":[]}' + allow(Oj::Parser.usual).to receive(:parse).and_return(nil) + + expect do + IpynbDiff::Transformer.new.transform(notebook) + end.to raise_error(IpynbDiff::InvalidNotebookError) + end + end end end |