Sha256: 9c017390ef08fb65a6874cd88fc82828588a4952d469fff879ead79943d5adb5
Contents?: true
Size: 635 Bytes
Versions: 1
Compression:
Stored size: 635 Bytes
Contents
require 'spec_helper' describe 'Parsing esoteric files and files causing ambiguous detection' do it 'correctly parses the test .docx files as Office docs' do docx_path = fixtures_dir + '/ZIP/10.docx' result = FormatParser.parse(File.open(docx_path, 'rb')) expect(result).not_to be_nil expect(result.nature).to eq(:document) end it 'does not return a result for a Keynote file when it mistakes it for a JPEG, and does not raise any errors' do jpeg_path = fixtures_dir + '/JPEG/keynote_recognized_as_jpeg.key' result = FormatParser.parse(File.open(jpeg_path, 'rb')) expect(result).to be_nil end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
format_parser-0.5.2 | spec/esoteric_formats_spec.rb |