Sha256: 43994009cb2e5f153855af81bb8293b27c7914405d34dbfec97da69c9a918e98
Contents?: true
Size: 1017 Bytes
Versions: 30
Compression:
Stored size: 1017 Bytes
Contents
require 'spec_helper' describe FormatParser::M3UParser do let(:parsed_m3u) do subject.call( File.open( Pathname.new(fixtures_dir).join('M3U').join(m3u_file), 'rb' ) ) end describe 'an m3u file with missing header' do let(:m3u_file) { 'plain_text.m3u' } it 'does not parse the file successfully' do expect(parsed_m3u).to be_nil end end describe 'an m3u file with valid header' do let(:m3u_file) { 'sample.m3u' } it 'parses the file successfully' do expect(parsed_m3u).not_to be_nil expect(parsed_m3u.nature).to eq(:text) expect(parsed_m3u.format).to eq(:m3u) expect(parsed_m3u.content_type).to eq('application/vnd.apple.mpegurl') end end describe 'an m3u8 file with valid header' do let(:m3u_file) { 'sample.m3u8' } it 'parses the file successfully' do expect(parsed_m3u).not_to be_nil expect(parsed_m3u.nature).to eq(:text) expect(parsed_m3u.format).to eq(:m3u) end end end
Version data entries
30 entries across 30 versions & 1 rubygems