Sha256: 2a102087c86bf0644c073077649b9841a62d75c322309c3954dc376e7ca1d3e3
Contents?: true
Size: 756 Bytes
Versions: 4
Compression:
Stored size: 756 Bytes
Contents
require 'spec_helper' shared_examples 'an audio object with format' do context 'read from the WAVE file' do subject { described_class.new(WAV_PATH) } its(:bit_depth) { should eq 8 } its(:channel_count) { should eq 1 } its(:frequency) { should eq 11025 } end context 'read from the Ogg Vorbis file' do subject { described_class.new(OV_PATH) } its(:bit_depth) { should eq 16 } its(:channel_count) { should eq 1 } its(:frequency) { should eq 44100 } end it 'fails reading audio if a wrong format is specified' do expect do described_class.new(WAV_PATH, Format::OV) end.to raise_error /Ogg Vorbis/ expect do described_class.new(OV_PATH, Format::MPG) end.to raise_error /MPEG/ end end
Version data entries
4 entries across 4 versions & 1 rubygems